-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (20 loc) · 814 Bytes
/
Dockerfile
File metadata and controls
30 lines (20 loc) · 814 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
# syntax=docker/dockerfile:1.7-labs
# Based on https://gilgi.org/blog/python-docker-slim/
FROM python:3.11 AS dep-builder
COPY requirements-frozen.txt /build/requirements.txt
RUN pip wheel --no-deps -w /build/dist -r /build/requirements.txt
# base image: installs wheels for all dependencies
FROM python:3.11-slim AS base
# copy all wheels from builder and install
COPY --from=dep-builder [ "/build/dist/*.whl", "/install/" ]
RUN pip install --no-index /install/*.whl \
&& rm -rf /install
FROM base AS final
RUN adduser --home /app --disabled-password app
USER app
WORKDIR /app
COPY --parents ./.streamlit ./* ./
RUN find $(pwd)
EXPOSE 8080
HEALTHCHECK CMD curl --fail http://localhost:8080/_stcore/health
ENTRYPOINT ["streamlit", "run", "cvbot.py", "--server.port=8080", "--server.address=0.0.0.0"]