File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # uv base image
2- FROM python:3.11-slim-bookworm
1+ FROM python:3.12-slim
32
4- # Install uv for fast dependency management
5- COPY --from=ghcr.io/astral-sh/uv:0.8.13 /uv /uvx /bin/
3+ # Install uv
4+ COPY --from=ghcr.io/astral-sh/uv:0.8.13 /usr/local/bin/ uv /usr/local /bin/
65
7- # Set the working directory
86WORKDIR /app
97
10- # Copy dependency files first to leverage Docker layer caching
8+ # Install dependencies
119COPY pyproject.toml uv.lock ./
10+ RUN uv sync --frozen --no-dev --system
1211
13- # Install dependencies using uv
14- RUN uv sync --frozen --no-dev
12+ # Copy app
13+ COPY apps/ .
1514
16- # Copy the marimo notebook file
17- COPY apps/ notebooks/
15+ # Default notebook
16+ ENV MARIMO_NOTEBOOK=gs_process.py
1817
19- # env. variable to define notebook to run (will be overriden by render at runtime)
20- ENV MARIMO_NOTEBOOK="notebooks/gram_schmidt_process.py"
21-
22- # Expose the marimo port
2318EXPOSE 2718
2419
25- # Run the notebook through shell command
26- CMD ["sh" , "-c" , "uv run marimo run ${MARIMO_NOTEBOOK:?Set MARIMO_NOTEBOOK} --host 0.0.0.0 --port 2718" ]
27-
28-
29- # Advancements:
30- # 3. make it well-define
20+ CMD ["sh" , "-c" , "uv run marimo run ${MARIMO_NOTEBOOK:-gs_process.py} --host 0.0.0.0 --port 2718" ]
You can’t perform that action at this time.
0 commit comments