-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 838 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 838 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
FROM python:3.11
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml poetry.lock README.md ./
COPY core ./core
COPY db ./db
COPY models.py main.py ./
RUN python3.11 -m pip install --no-cache-dir .
COPY . .
RUN set -ex \
&& addgroup --system --gid 1001 appgroup \
&& adduser --system --uid 1001 --gid 1001 --home /home/appuser appuser \
&& mkdir -p /home/appuser/.streamlit /home/appuser/.groupint/sessions \
&& chown -R appuser:appgroup /home/appuser /app
ENV HOME=/home/appuser
EXPOSE 8501
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
RUN chmod +x /app/docker-entrypoint.sh
ENTRYPOINT ["/app/docker-entrypoint.sh"]
CMD ["streamlit", "run", "interface.py", "--server.port=8501", "--server.address=0.0.0.0"]