aastikny commited on
Commit
59b106e
·
verified ·
1 Parent(s): 3dccca8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 the dependency files first to cache the layer
14
  COPY pyproject.toml uv.lock ./
15
 
16
- # Install dependencies using uv
17
- RUN uv sync --frozen
18
 
19
- # Copy the rest of the application code
20
  COPY . .
21
 
22
- # Expose the port the FastAPI server runs on
23
- EXPOSE 8000
24
 
25
- # Start the OpenEnv server
26
- CMD ["uv", "run", "server/app.py"]
 
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"]