-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
31 lines (22 loc) · 1017 Bytes
/
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
FROM java:jre-alpine
# Download the latest CoreNLP distribution
# Add and train our custom NER model during build
# Original by Moti Zilberman <[email protected]>
# https://hub.docker.com/r/motiz88/corenlp/~/dockerfile/
RUN apk add --update --no-cache \
unzip \
wget
RUN wget http://nlp.stanford.edu/software/stanford-corenlp-latest.zip
RUN unzip stanford-corenlp-latest.zip && \
rm stanford-corenlp-latest.zip
WORKDIR /stanford-corenlp-4.1.0
COPY bgs.3class.geo* ./
COPY vocab.gaz.txt ./
COPY server.properties ./
RUN java -cp stanford-corenlp-4.1.0.jar edu.stanford.nlp.ie.crf.CRFClassifier -prop bgs.3class.geo.prop
# English model referred to in server.properties is in this jar
RUN unzip stanford-corenlp-4.1.0-models.jar
RUN export CLASSPATH="`find . -name '*.jar'`:.*"
EXPOSE 9000
# Add our models into the container and to the classpath
CMD java -cp "*" -mx4g edu.stanford.nlp.pipeline.StanfordCoreNLPServer -serverProperties server.properties -loadClassifier bgs.3class.geo.crf.ser.gz