forked from clarinsi/marcell-annotation-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (27 loc) · 1.33 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
FROM pytorch/pytorch:1.5-cuda10.1-cudnn7-runtime
COPY classla-stanfordnlp /usr/src/stanfordnlp
WORKDIR /usr/src/stanfordnlp
RUN pip install --no-cache-dir protobuf requests tqdm && \
pip install --no-deps . && \
apt-get update && apt-get install -y --no-install-recommends openjdk-11-jre openjdk-11-jdk supervisor
COPY Obeliks4J /usr/src/Obelisk4J
WORKDIR /usr/src/Obelisk4J
RUN javac -encoding UTF-8 src/main/java/org/obeliks/*.java -d target/classes && \
cp src/main/resources/* target/classes/org/obeliks/ && \
jar -cef org.obeliks.Tokenizer obeliks.jar -C target/classes org
RUN pip install --no-cache-dir flask gunicorn && \
mkdir /pipeline
COPY models /pipeline/models
WORKDIR /pipeline
COPY pipeline_api.py wsgi.py /pipeline/
# TODO: Fix preloading. For now every worker loads its seperate models in memory.
# CMD ["gunicorn", "--bind", "0.0.0.0:80", "-w", "1", "--timeout", "1800", "--access-logfile", "-", "wsgi:app"]
RUN pip install --no-cache-dir bs4 lxml pandas requests_toolbelt && \
mkdir /anonymization
WORKDIR /anonymization
COPY anonymization/anon_api.py anonymization/utils.py \
anonymization/wsgi.py /anonymization/
COPY anonymization/static /anonymization/static
COPY anonymization/templates /anonymization/templates
COPY supervisor /supervisor
CMD ["supervisord","-c","/supervisor/service_script.conf"]