-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 857 Bytes
/
Dockerfile
File metadata and controls
34 lines (24 loc) · 857 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
FROM python:3.13.12-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y ffmpeg curl && rm -rf /var/lib/apt/lists/*
# Install uv
COPY --from=ghcr.io/astral-sh/uv:0.10.10 /uv /uvx /bin/
# Copy pyproject and lock file to leverage Docker cache
COPY pyproject.toml uv.lock ./
# Install Python dependencies
RUN uv sync --frozen --no-dev --no-install-workspace
# Copy application's code
COPY . /app/
# Streamlit's configuration options
ENV PYTHONPATH="/app"
ENV STREAMLIT_CLIENT_TOOLBAR_MODE="viewer"
ENV STREAMLIT_SERVER_PORT=8501
ENV ENVIRONMENT=production
# Expose port for the application
EXPOSE 8501
# Add healthcheck
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
# Set the entrypoint
ENTRYPOINT ["uv", "run", "streamlit", "run", "main.py", "--server.address=0.0.0.0"]