-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 947 Bytes
/
Dockerfile
File metadata and controls
40 lines (30 loc) · 947 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
35
36
37
38
39
40
FROM python:3.11-slim
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Set working directory
WORKDIR /workspace
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js (needed for npx MCP servers like filesystem)
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Copy project definition
COPY pyproject.toml uv.lock ./
# Install Python dependencies
RUN uv sync --frozen
# Copy project files
COPY . .
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PATH="/workspace/.venv/bin:$PATH"
# Create a non-root user
RUN useradd -m -s /bin/bash workshop
RUN chown -R workshop:workshop /workspace
USER workshop
# Default: run Streamlit client
EXPOSE 8501
CMD ["streamlit", "run", "08-mcp-client-single.py", "--server.address=0.0.0.0"]