-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
34 lines (23 loc) · 929 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
32
33
34
FROM python:3.12-slim
RUN apt-get update && \
apt-get install -y \
supervisor nginx \
build-essential gcc g++ \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /apps
RUN python -m venv /venvs/appenv
# Uncomment this line if you're running this on ARM (Apple silicon)
# RUN BLIS_ARCH="generic" /venvs/appenv/bin/pip install spacy==3.8.3 --no-binary blis
COPY requirements.txt /apps/requirements.txt
RUN /venvs/appenv/bin/pip install pip --upgrade
RUN /venvs/appenv/bin/pip install -r /apps/requirements.txt
RUN /venvs/appenv/bin/python -m spacy download en_core_web_lg
COPY nginx.conf /etc/nginx/nginx.conf
COPY supervisord.conf /etc/supervisord.conf
COPY . /apps/
RUN rm -f /apps/*.db
RUN /venvs/appenv/bin/pip install -e presidioui/
RUN /venvs/appenv/bin/python -m presidioui.models db
RUN /venvs/appenv/bin/python -m presidioui.models load
EXPOSE 80
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]