-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 785 Bytes
/
Dockerfile
File metadata and controls
25 lines (18 loc) · 785 Bytes
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
FROM python:3.10-slim-bullseye AS builder
RUN apt-get update \
&& apt-get install -y --no-install-recommends liblapack-dev libopenblas-dev gfortran \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /app
RUN pip3 install -r requirements.txt --no-cache-dir
RUN apt-get update \
&& apt-get purge -y --no-install-recommends liblapack-dev libopenblas-dev gfortran \
&& apt-get install -y --no-install-recommends liblapack3 libopenblas0 \
&& apt-get autopurge -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
COPY . /app
FROM builder as runner
RUN python3 manage.py migrate
RUN pip3 install -U uvicorn --no-cache-dir
ENTRYPOINT ["python3"]
CMD ["-m", "uvicorn", "--host", "0.0.0.0", "--port", "8000", "optiserver.asgi:application"]