Skip to content

Commit 5b4f11b

Browse files
authored
Multiple notebooks Integration
1 parent 62c2292 commit 5b4f11b

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM python:3.13-slim-bookworm
1+
# uv base image
2+
FROM python:3.11-slim-bookworm
23

34
# Install uv for fast dependency management
45
COPY --from=ghcr.io/astral-sh/uv:0.8.13 /uv /uvx /bin/
@@ -10,19 +11,20 @@ WORKDIR /app
1011
COPY pyproject.toml uv.lock ./
1112

1213
# Install dependencies using uv
13-
RUN uv sync --frozen
14+
RUN uv sync --frozen --no-dev
1415

1516
# Copy the marimo notebook file
16-
COPY gram_schmidt_process.py .
17+
COPY apps/ notebooks/
18+
19+
# env. variable to define notebook to run (will be overriden by render at runtime)
20+
ENV MARIMO_NOTEBOOK="notebooks/gram_schmidt_process.py"
1721

1822
# Expose the marimo port
1923
EXPOSE 2718
2024

21-
# Run the notebook
22-
CMD ["uv", "run", "marimo", "run", "gram_schmidt_process.py", "--host", "0.0.0.0", "--port", "2718"]
25+
# Run the notebook through shell command
26+
CMD ["sh", "-c", "marimo run ${MARIMO_NOTEBOOK:?Set MARIMO_NOTEBOOK} --host 0.0.0.0 --port 2718"]
2327

2428

2529
# Advancements:
26-
# 1. adding env variable to CMD
27-
# 2. multiple notebooks integration
28-
# 3. make it well-define
30+
# 3. make it well-define

0 commit comments

Comments
 (0)