-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (18 loc) · 758 Bytes
/
Dockerfile
File metadata and controls
35 lines (18 loc) · 758 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
26
27
28
29
30
31
32
33
34
35
FROM python:3.12-slim AS requirements-image
ENV PYTHONUNBUFFERED=1
RUN ["pip","install","poetry>=2.0.0,<3.0.0"]
RUN ["poetry","self","add","poetry-plugin-export"]
WORKDIR /export
COPY pyproject.toml poetry.lock ./
RUN ["poetry","export","--format","requirements.txt","--output","requirements.txt"]
FROM python:3.12-slim AS runtime-image
LABEL description="CYSCOM VIT's leaderboard"
ENV PYTHONUNBUFFERED=1
COPY --from=requirements-image /export/requirements.txt requirements.txt
RUN ["pip","install","gunicorn"]
RUN ["useradd","--create-home","cyscom-docker"]
USER cyscom-docker
RUN ["pip","install","--requirement","requirements.txt"]
WORKDIR /home/cyscom-docker/opensrc-website
COPY . .
CMD gunicorn --bind 0.0.0.0:5000 --workers 2 wsgi:app