Update Dockerfile
Browse files- Dockerfile +52 -6
Dockerfile
CHANGED
@@ -1,9 +1,55 @@
|
|
1 |
-
FROM lfoppiano/grobid-
|
|
|
|
|
|
|
|
|
2 |
USER root
|
3 |
-
RUN mkdir -m 777 -p /opt/grobid/grobid-home/tmp
|
4 |
-
RUN mkdir -m 777 -p /opt/grobid/logs
|
5 |
-
RUN chmod -R uog+rw /data/db
|
6 |
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM lfoppiano/grobid:0.8.2-RC1-full as runtime
|
2 |
+
|
3 |
+
# setting locale is likely useless but to be sure
|
4 |
+
ENV LANG C.UTF-8
|
5 |
+
|
6 |
USER root
|
|
|
|
|
|
|
7 |
|
8 |
+
RUN apt-get update && \
|
9 |
+
apt-get -y --no-install-recommends install unzip wget
|
10 |
+
|
11 |
+
WORKDIR /opt/grobid
|
12 |
+
|
13 |
+
# gradle
|
14 |
+
COPY gradle/ ./gradle/
|
15 |
+
COPY gradlew ./
|
16 |
+
COPY gradle.properties ./
|
17 |
+
COPY build.gradle ./
|
18 |
+
COPY settings.gradle ./
|
19 |
+
|
20 |
+
# source
|
21 |
+
COPY grobid-core/ ./grobid-core/
|
22 |
+
COPY grobid-service/ ./grobid-service/
|
23 |
+
COPY grobid-trainer/ ./grobid-trainer/
|
24 |
+
|
25 |
+
# Setting DL-powered configuration + biblio-glutton
|
26 |
+
COPY grobid-home/config/grobid-evaluation.yaml grobid-home/config/config.yaml
|
27 |
+
|
28 |
+
RUN rm -rf /opt/grobid/grobid-home/models/*-with_ELMo \
|
29 |
+
&& mkdir /opt/grobid/evaluation
|
30 |
+
|
31 |
+
# Download evaluation data
|
32 |
+
WORKDIR /opt/grobid/evaluation
|
33 |
+
RUN wget https://zenodo.org/records/3873702/files/biorxiv-10k-test-2000.zip -O biorxiv-10k-test-2000.zip \
|
34 |
+
&& unzip biorxiv-10k-test-2000.zip -d biorxiv-10k-test-2000 \
|
35 |
+
&& wget https://zenodo.org/records/7708580/files/eLife_984.zip -O eLife_984.zip \
|
36 |
+
&& unzip eLife_984.zip -d eLife_984 \
|
37 |
+
&& wget https://zenodo.org/records/7708580/files/PLOS_1000.zip -O PLOS_1000.zip \
|
38 |
+
&& unzip PLOS_1000.zip -d PLOS_1000 \
|
39 |
+
&& wget https://zenodo.org/records/7708580/files/PMC_sample_1943.zip -O PMC_sample_1943.zip \
|
40 |
+
&& unzip PMC_sample_1943.zip -d PMC_sample_1943 \
|
41 |
+
&& rm *.zip
|
42 |
+
|
43 |
+
|
44 |
+
VOLUME ["/opt/grobid/grobid-home/tmp"]
|
45 |
+
|
46 |
+
WORKDIR /opt/grobid
|
47 |
+
|
48 |
+
CMD ["/bin/bash", "-c", "./gradlew jatsEval -Pp2t=/opt/grobid/evaluation/PMC_sample_1943 -Prun=1 -PfileRatio=1; ./gradlew jatsEval -Pp2t=/opt/grobid/evaluation/biorxiv-10k-test-2000 -Prun=1 -PfileRatio=1; ./gradlew jatsEval -Pp2t=/opt/grobid/evaluation/eLife_984 -Prun=1 -PfileRatio=1; ./gradlew jatsEval -Pp2t=/opt/grobid/evaluation/PLOS_1000 -Prun=1 -PfileRatio=1;"]
|
49 |
|
50 |
+
LABEL \
|
51 |
+
authors="The contributors" \
|
52 |
+
org.label-schema.name="Grobid" \
|
53 |
+
org.label-schema.description="Image running the Grobid End 2 end evaluation" \
|
54 |
+
org.label-schema.url="https://github.com/kermitt2/Grobid" \
|
55 |
+
org.label-schema.version=${GROBID_VERSION}
|