sidmaz666 commited on
Commit
ce49fae
·
verified ·
1 Parent(s): 131a3a3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -4,22 +4,22 @@ FROM python:3.10-slim
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies (optional, but good for some transformers backends)
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
  git \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Copy requirements first to cache dependencies
13
  COPY requirements.txt .
14
 
15
  # Install Python dependencies
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # Copy the application code
19
  COPY app.py .
20
 
21
- # Expose the port
22
- EXPOSE 8000
23
 
24
- # Command to run the app
25
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
  git \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Copy requirements
13
  COPY requirements.txt .
14
 
15
  # Install Python dependencies
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
+ # Copy application code
19
  COPY app.py .
20
 
21
+ # Expose the default Hugging Face Space port (7860)
22
+ EXPOSE 7860
23
 
24
+ # Hugging Face Spaces expects the app to run on port 7860
25
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]