kouki321 commited on
Commit
e1982be
·
verified ·
1 Parent(s): de1f02a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -1,14 +1,16 @@
1
- # Use the official Hugging Face Spaces base image for Python
2
  FROM huggingface/spaces-python:latest
3
 
4
- # Install required Python packages
5
- RUN pip install --no-cache-dir transformers fastapi uvicorn
 
6
 
7
- # Copy app.py into the container
8
  COPY app.py /app/app.py
9
 
10
- # Expose port 7860 (standard for Spaces) or any you want
11
  EXPOSE 7860
12
 
13
  # Run the FastAPI app with uvicorn
14
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
1
+ # Use the official Hugging Face Spaces Python base image
2
  FROM huggingface/spaces-python:latest
3
 
4
+ # Install only your extra dependencies
5
+ COPY requirements.txt /app/requirements.txt
6
+ RUN pip install --no-cache-dir -r /app/requirements.txt
7
 
8
+ # Copy your app code
9
  COPY app.py /app/app.py
10
 
 
11
  EXPOSE 7860
12
 
13
  # Run the FastAPI app with uvicorn
14
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
15
+
16
+