KVMKASH commited on
Commit
be574bf
·
verified ·
1 Parent(s): fbcbfc1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -10
Dockerfile CHANGED
@@ -5,23 +5,20 @@ WORKDIR /app
5
  # 1. Install system tools
6
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
7
 
8
- # 2. Upgrade pip and install BUILD BACKENDS globally
9
- # This ensures 'setuptools.build-meta' is present before the project install
10
  RUN pip install --no-cache-dir --upgrade pip
11
- RUN pip install --no-cache-dir setuptools>=61.0 wheel uv
12
 
13
- # 3. Pre-install dependencies to satisfy the lockfile
14
  RUN pip install --no-cache-dir fastapi uvicorn pydantic "openenv-core>=0.2.0"
15
 
16
- # 4. Copy all files (including the uv.lock for Scaler)
17
  COPY . .
18
 
19
- # 5. Install the project in editable mode
20
- # We remove --no-build-isolation to let pip use the global tools we just installed
21
- RUN pip install --no-cache-dir -e .
22
-
23
  ENV PYTHONPATH=/app
24
  EXPOSE 7860
25
 
26
- # 6. Run the module to ensure main() is called
 
27
  CMD ["python", "-m", "server.app"]
 
5
  # 1. Install system tools
6
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
7
 
8
+ # 2. Install the tools GLOBALLY
 
9
  RUN pip install --no-cache-dir --upgrade pip
10
+ RUN pip install --no-cache-dir setuptools wheel uv
11
 
12
+ # 3. Install dependencies directly (This bypasses the pyproject.toml build hook)
13
  RUN pip install --no-cache-dir fastapi uvicorn pydantic "openenv-core>=0.2.0"
14
 
15
+ # 4. Copy your files (This satisfies Scaler's uv.lock requirement)
16
  COPY . .
17
 
18
+ # 5. Set environment variables so Python can find your 'server' and 'env' folders
 
 
 
19
  ENV PYTHONPATH=/app
20
  EXPOSE 7860
21
 
22
+ # 6. Run the app directly as a module
23
+ # This works because we set PYTHONPATH and have __init__.py files
24
  CMD ["python", "-m", "server.app"]