Update Dockerfile
Browse files- Dockerfile +8 -12
Dockerfile
CHANGED
|
@@ -1,26 +1,22 @@
|
|
| 1 |
# Use a lightweight python image
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
-
# Install system dependencies (SQLite is built-in, but we need curl for healthchecks)
|
| 5 |
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
| 6 |
-
|
| 7 |
-
# Install uv (the fast python package manager)
|
| 8 |
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
| 9 |
|
| 10 |
-
# Set the working directory
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
-
# Copy
|
| 14 |
COPY pyproject.toml uv.lock ./
|
| 15 |
|
| 16 |
-
# Install dependencies
|
| 17 |
-
RUN uv
|
| 18 |
|
| 19 |
-
# Copy the rest of the
|
| 20 |
COPY . .
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
|
| 24 |
|
| 25 |
-
# Start the
|
| 26 |
-
CMD ["
|
|
|
|
| 1 |
# Use a lightweight python image
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
|
|
|
| 4 |
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
| 5 |
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
| 6 |
|
|
|
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
+
# Copy dependency files
|
| 10 |
COPY pyproject.toml uv.lock ./
|
| 11 |
|
| 12 |
+
# Install dependencies into the system path so they are always findable
|
| 13 |
+
RUN uv pip install --system fastapi uvicorn pydantic openai openenv-core
|
| 14 |
|
| 15 |
+
# Copy the rest of the code
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
+
# Set PYTHONPATH to the current directory so imports always work
|
| 19 |
+
ENV PYTHONPATH=/app
|
| 20 |
|
| 21 |
+
# Start the server directly
|
| 22 |
+
CMD ["python", "server/app.py"]
|