yiyixin commited on
Commit
af6cd2d
1 Parent(s): 942c3d7
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. run.sh +8 -2
Dockerfile CHANGED
@@ -38,7 +38,7 @@ EXPOSE 8070
38
  RUN apt-get update && \
39
  apt-get install -y wget unzip
40
  RUN chmod +x serve_grobid.sh
41
- RUN ./serve_grobid.sh
42
 
43
  # open the backend server and streamlit app
44
  RUN chmod +x run.sh
 
38
  RUN apt-get update && \
39
  apt-get install -y wget unzip
40
  RUN chmod +x serve_grobid.sh
41
+ # RUN ./serve_grobid.sh
42
 
43
  # open the backend server and streamlit app
44
  RUN chmod +x run.sh
run.sh CHANGED
@@ -1,4 +1,10 @@
1
- GROBID_VERSION="0.6.2"
2
- /app/grobid-${GROBID_VERSION}/gradlew run &
 
 
 
 
 
 
3
  nohup python backend.py &
4
  streamlit run frontend.py --server.address 0.0.0.0 --server.port 7860 --server.enableCORS true --server.enableXsrfProtection false
 
1
+ # download GROBID if directory does not exist
2
+ declare -r GROBID_VERSION="0.6.2" # or change to current stable version
3
+ if [ ! -d grobid-${GROBID_VERSION} ]; then
4
+ wget https://github.com/kermitt2/grobid/archive/${GROBID_VERSION}.zip
5
+ unzip "${GROBID_VERSION}.zip"
6
+ rm "${GROBID_VERSION}.zip"
7
+ fi
8
+ /app/grobid-${GROBID_VERSION}/gradlew run
9
  nohup python backend.py &
10
  streamlit run frontend.py --server.address 0.0.0.0 --server.port 7860 --server.enableCORS true --server.enableXsrfProtection false