forked from kermitt2/entity-fishing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (26 loc) · 1.52 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
## Docker GROBID image using deep learning models and/or CRF models
## See https://grobid.readthedocs.io/en/latest/Grobid-docker/
## usage example with version 0.7.1-SNAPSHOT:
## docker build -t grobid/grobid:0.7.1-SNAPSHOT --build-arg GROBID_VERSION=0.7.1-SNAPSHOT --file Dockerfile.delft .
## no GPU:
## docker run -t --rm --init -p 8070:8070 -p 8071:8071 -v /home/lopez/grobid/grobid-home/config/grobid.properties:/opt/grobid/grobid-home/config/grobid.properties:ro grobid/grobid:0.7.1-SNAPSHOT
## allocate all available GPUs (only Linux with proper nvidia driver installed on host machine):
## docker run --rm --gpus all --init -p 8070:8070 -p 8071:8071 -v /home/lopez/obid/grobid-home/config/grobid.properties:/opt/grobid/grobid-home/config/grobid.properties:ro grobid/grobid:0.7.1-SNAPSHOT
# -------------------
# build builder image
# -------------------
#FROM openjdk:8u212-jdk as builder
FROM openjdk:8u275-jdk
USER root
RUN apt-get update && \
apt-get -y --no-install-recommends install unzip git
WORKDIR /opt/
RUN git clone https://github.com/kermitt2/grobid.git --branch 0.7.0
RUN cd grobid && ./gradlew clean install
RUN cd grobid/ && git clone https://github.com/kermitt2/grobid-ner.git && cd grobid-ner && \
./gradlew copyModels && ./gradlew clean install
WORKDIR /opt/
RUN git clone https://github.com/kermitt2/entity-fishing.git && cd entity-fishing && git checkout bd6db6d94ff7e5302085a2acb31e780d00b1552c && ./gradlew clean build -x test
COPY run-ef /opt/
WORKDIR /opt/entity-fishing
CMD ["/opt/run-ef"]