-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.cpu
35 lines (28 loc) · 990 Bytes
/
Dockerfile.cpu
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
FROM python:3.9
LABEL maintainer="jlouradour@linagora.com"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
g++ \
openjdk-11-jre-headless \
curl \
wget
# Rust compiler for tokenizers
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /usr/src/app
# Python dependencies
COPY requirements.cpu.txt .
RUN pip3 install --no-cache-dir -r requirements.cpu.txt -f https://download.pytorch.org/whl/torch_stable.html
# Supervisor
COPY celery_app /usr/src/app/celery_app
COPY http_server /usr/src/app/http_server
COPY document /usr/src/app/document
COPY punctuation /usr/src/app/punctuation
RUN mkdir /usr/src/app/model-store
RUN mkdir -p /usr/src/app/tmp
COPY docker-entrypoint.sh wait-for-it.sh healthcheck.sh ./
ENV PYTHONPATH="${PYTHONPATH}:/usr/src/app/punctuation"
HEALTHCHECK CMD ./healthcheck.sh
ENV TEMP=/usr/src/app/tmp
ENTRYPOINT ["./docker-entrypoint.sh"]