Leon4gr45 commited on
Commit
7ad47ac
·
verified ·
1 Parent(s): 4a15a33

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -12,7 +12,8 @@ RUN pip install uv
12
 
13
  # Copy requirements and install them efficiently
14
  COPY requirements.txt .
15
- RUN uv pip install --no-cache -r requirements.txt
 
16
 
17
  # Copy the application code into the container
18
  COPY ./app.py /app/app.py
@@ -21,6 +22,5 @@ WORKDIR /app
21
  # Expose the port the app will run on
22
  EXPOSE 7860
23
 
24
- # THE CRITICAL COMMAND: This tells the container how to run your FastAPI app.
25
- # The Gradio SDK cannot do this.
26
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
12
 
13
  # Copy requirements and install them efficiently
14
  COPY requirements.txt .
15
+ # THE FIX IS HERE: Add the --system flag to the uv command
16
+ RUN uv pip install --no-cache --system -r requirements.txt
17
 
18
  # Copy the application code into the container
19
  COPY ./app.py /app/app.py
 
22
  # Expose the port the app will run on
23
  EXPOSE 7860
24
 
25
+ # The command to run the FastAPI app
 
26
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]