thisisgini commited on
Commit
26de7b6
·
verified ·
1 Parent(s): dfb2be2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -10
Dockerfile CHANGED
@@ -1,25 +1,21 @@
1
  FROM ghcr.io/meta-pytorch/openenv-base:latest
2
 
3
- # Set the working directory to /app
4
  WORKDIR /app
5
 
6
- # Install system dependencies
7
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
8
 
9
- # Copy everything from your repo into /app
10
- # This ensures /app/server/app.py exists
11
  COPY . /app
12
 
13
- # Install dependencies
 
 
 
14
  RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
15
  /root/.local/bin/uv pip install --system fastapi uvicorn httpx openai openenv
16
 
17
- # Force Python to look at the root directory for modules
18
  ENV PYTHONPATH="/app"
19
-
20
- # Expose the correct port
21
  EXPOSE 7860
22
 
23
- # We use the relative path from the WORKDIR
24
- # This tells uvicorn: "Look in the 'server' folder for 'app.py' and the 'app' variable"
25
  CMD ["python3", "-m", "uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM ghcr.io/meta-pytorch/openenv-base:latest
2
 
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6
 
7
+ # Copy everything
 
8
  COPY . /app
9
 
10
+ # DEBUG: This will print the file list in your Hugging Face logs
11
+ # so we can see where the 'server' folder actually is.
12
+ RUN ls -R /app
13
+
14
  RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
15
  /root/.local/bin/uv pip install --system fastapi uvicorn httpx openai openenv
16
 
 
17
  ENV PYTHONPATH="/app"
 
 
18
  EXPOSE 7860
19
 
20
+ # We use the module syntax
 
21
  CMD ["python3", "-m", "uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]