forked from nicolasguelfi/streamtex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
39 lines (29 loc) · 1.07 KB
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
36
37
38
39
FROM python:3.13.7-slim
# Avoid interactive tzdata prompts, speed up apt
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
STREAMLIT_SERVER_HEADLESS=true \
STREAMLIT_BROWSER_GATHERUSAGESTATS=false \
UV_LINK_MODE=copy
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Install dependencies (cached layer)
COPY pyproject.toml uv.lock ./
COPY streamtex/ ./streamtex/
RUN uv sync --frozen --no-dev
# Copy the target project and shared blocks (used by LazyBlockRegistry)
ARG FOLDER="documentation/manuals/stx_manual_intro"
COPY ${FOLDER}/ ./${FOLDER}/
COPY documentation/manuals/stx_manuals_shared-blocks/ ./documentation/manuals/stx_manuals_shared-blocks/
WORKDIR /app/${FOLDER}
ENV PORT=8501
EXPOSE 8501
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
ENTRYPOINT ["uv", "run", "streamlit", "run", "book.py", "--server.port=8501", "--server.address=0.0.0.0"]