fugthchat commited on
Commit
f61df7f
·
verified ·
1 Parent(s): 478eb11

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -6
Dockerfile CHANGED
@@ -19,9 +19,7 @@ COPY ./requirements.txt /app/requirements.txt
19
  # Install Python packages
20
  RUN pip install --no-cache-dir --upgrade pip
21
 
22
- # --- THIS IS THE FIX ---
23
- # It will now look for version 0.2.80 (from requirements.txt)
24
- # in the special URL and find the pre-compiled file.
25
  RUN pip install --no-cache-dir -r /app/requirements.txt \
26
  --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
27
 
@@ -31,6 +29,7 @@ COPY ./app.py /app/app.py
31
  # Expose the port that FastAPI (uvicorn) will run on
32
  EXPOSE 7860
33
 
34
- # Command to run the application
35
- # This starts app.py, which will THEN download the model on startup.
36
- CMD ["python", "app.py"]
 
 
19
  # Install Python packages
20
  RUN pip install --no-cache-dir --upgrade pip
21
 
22
+ # This line is correct and fixed your build timeout
 
 
23
  RUN pip install --no-cache-dir -r /app/requirements.txt \
24
  --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
25
 
 
29
  # Expose the port that FastAPI (uvicorn) will run on
30
  EXPOSE 7860
31
 
32
+ # --- THIS IS THE FIX ---
33
+ # Instead of just running the script, we tell uvicorn to run the "app"
34
+ # object inside the "app.py" file. This starts the server.
35
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]