bhumitps commited on
Commit
76fad84
·
verified ·
1 Parent(s): ffa4933

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -9
Dockerfile CHANGED
@@ -4,17 +4,14 @@ FROM python:3.9-slim
4
  # Set the working directory in the container
5
  WORKDIR /app
6
 
7
- # Copy the current directory contents into the container at /app
8
  COPY . /app
9
 
10
- # Copy the model artifacts directory
11
- COPY model_artifacts /app/model_artifacts
12
-
13
- # Install any needed packages specified in requirements.txt
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Make port 5000 available to the world outside this container
17
- EXPOSE 5000
18
 
19
- # Run the application using gunicorn
20
- CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:app"]
 
4
  # Set the working directory in the container
5
  WORKDIR /app
6
 
7
+ # Copy everything into /app (includes backend_files and model_artifacts if present)
8
  COPY . /app
9
 
10
+ # Install dependencies
 
 
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Hugging Face Spaces will set the PORT environment variable (default: 7860)
14
+ EXPOSE 7860
15
 
16
+ # Run the application with Gunicorn, binding to $PORT
17
+ CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:${PORT}", "app:app"]