-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (25 loc) · 1.08 KB
/
Copy pathDockerfile
File metadata and controls
37 lines (25 loc) · 1.08 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
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a Python image with uv pre-installed
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv
# Set the working directory
WORKDIR /app
# Copy the pyproject.toml and the lock file if available
COPY pyproject.toml ./
# Copy the entire app directory
COPY . .
# Install the project's dependencies using uv
RUN --mount=type=cache,target=/root/.cache/uv uv sync --frozen --no-install-project --no-dev --no-editable
# Build the server
RUN --mount=type=cache,target=/root/.cache/uv uv run fastmcp dev ./server/browser_navigator_server.py:app
FROM python:3.12-slim-bookworm
WORKDIR /app
COPY --from=uv /root/.local /root/.local
COPY --from=uv --chown=app:app /app/.venv /app/.venv
# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"
# Set environment variables for Azure OpenAI from .env
ENV $(cat .env | xargs)
# Set the entrypoint command
ENTRYPOINT ["uv", "run", "fastmcp", "dev", "./server/browser_navigator_server.py:app"]
# Expose the necessary port
EXPOSE 5173