upload
Browse files- .gitignore +2 -0
- Dockerfile +7 -5
- run.sh +1 -1
- serve_grobid.sh +4 -1
.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
grobid-0.6.2
|
| 2 |
+
__pycache__
|
Dockerfile
CHANGED
|
@@ -30,6 +30,12 @@ ENV PATH $JAVA_HOME/bin:$PATH
|
|
| 30 |
# Install any needed packages specified in requirements.txt
|
| 31 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
# Copy the current directory contents into the container at /app
|
| 34 |
COPY . /app
|
| 35 |
|
|
@@ -38,11 +44,7 @@ EXPOSE 5000
|
|
| 38 |
EXPOSE 7860
|
| 39 |
EXPOSE 8070
|
| 40 |
|
| 41 |
-
|
| 42 |
-
RUN apt-get update && \
|
| 43 |
-
apt-get install -y wget unzip
|
| 44 |
-
RUN chmod +x serve_grobid.sh
|
| 45 |
-
RUN ./serve_grobid.sh
|
| 46 |
RUN chmod +x /app/grobid-0.6.2/gradlew
|
| 47 |
RUN mkdir -m 777 -p /app/.gradle/
|
| 48 |
RUN mkdir -m 777 -p /app/?/.gradle/
|
|
|
|
| 30 |
# Install any needed packages specified in requirements.txt
|
| 31 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 32 |
|
| 33 |
+
# open the grobid server
|
| 34 |
+
RUN apt-get update && \
|
| 35 |
+
apt-get install -y wget unzip
|
| 36 |
+
RUN chmod +x serve_grobid.sh
|
| 37 |
+
RUN ./serve_grobid.sh
|
| 38 |
+
|
| 39 |
# Copy the current directory contents into the container at /app
|
| 40 |
COPY . /app
|
| 41 |
|
|
|
|
| 44 |
EXPOSE 7860
|
| 45 |
EXPOSE 8070
|
| 46 |
|
| 47 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
RUN chmod +x /app/grobid-0.6.2/gradlew
|
| 49 |
RUN mkdir -m 777 -p /app/.gradle/
|
| 50 |
RUN mkdir -m 777 -p /app/?/.gradle/
|
run.sh
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
cd /app/grobid-0.6.2
|
| 2 |
./gradlew run &
|
| 3 |
-
cd /app
|
| 4 |
nohup python backend.py &
|
| 5 |
streamlit run frontend.py --server.address 0.0.0.0 --server.port 7860 --server.enableCORS true --server.enableXsrfProtection false
|
|
|
|
| 1 |
cd /app/grobid-0.6.2
|
| 2 |
./gradlew run &
|
| 3 |
+
cd /app/
|
| 4 |
nohup python backend.py &
|
| 5 |
streamlit run frontend.py --server.address 0.0.0.0 --server.port 7860 --server.enableCORS true --server.enableXsrfProtection false
|
serve_grobid.sh
CHANGED
|
@@ -8,4 +8,7 @@ if [ ! -d grobid-${GROBID_VERSION} ]; then
|
|
| 8 |
sudo chmod 777 "${GROBID_VERSION}.zip"
|
| 9 |
unzip "${GROBID_VERSION}.zip"
|
| 10 |
rm "${GROBID_VERSION}.zip"
|
| 11 |
-
fi
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
sudo chmod 777 "${GROBID_VERSION}.zip"
|
| 9 |
unzip "${GROBID_VERSION}.zip"
|
| 10 |
rm "${GROBID_VERSION}.zip"
|
| 11 |
+
fi
|
| 12 |
+
cd grobid-${GROBID_VERSION} || exit
|
| 13 |
+
sudo chmod 777 gradlew
|
| 14 |
+
./gradlew
|