sdafd commited on
Commit
d87aabb
·
verified ·
1 Parent(s): 06fac16

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -14
Dockerfile CHANGED
@@ -27,17 +27,7 @@ RUN pip install --no-cache-dir --upgrade pip && \
27
  # Copy the rest of the application code (app.py) into the container at /code
28
  COPY app.py .
29
 
30
- # Make port 8000 available to the world outside this container
31
- # Hugging Face Spaces typically expects apps to run on 7860, but uvicorn defaults to 8000.
32
- # FastAPI/Uvicorn standard is 8000. HF Spaces should map correctly.
33
- # If you encounter issues, you might need to change this and the CMD port to 7860.
34
- EXPOSE 8000
35
-
36
- # Define environment variable (optional, can be set at runtime too)
37
- # ENV HF_HOME=/data # Example if models needed downloading, not relevant here.
38
-
39
- # Run app.py when the container launches using uvicorn
40
- # --host 0.0.0.0 makes the server accessible from outside the container
41
- # --port 8000 specifies the port to run on inside the container
42
- # app:app tells uvicorn to run the 'app' variable (your FastAPI instance) from the 'app.py' file
43
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
 
27
  # Copy the rest of the application code (app.py) into the container at /code
28
  COPY app.py .
29
 
30
+
31
+ EXPOSE 7860
32
+
33
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]