usmanyousaf commited on
Commit
0191d02
·
verified ·
1 Parent(s): 4232e48

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -10
Dockerfile CHANGED
@@ -3,21 +3,20 @@ FROM python:3.10-slim
3
  # Set working directory
4
  WORKDIR /app
5
 
 
 
 
6
  # Install system dependencies
7
  RUN apt-get update && apt-get install -y \
8
- build-essential \
9
- libpq-dev \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Copy the current directory contents into the container at /app
13
- COPY . /app
14
-
15
- # Install the required Python packages
16
  RUN pip install --upgrade pip
17
- RUN pip install -r requirements.txt
18
 
19
- # Expose the port Hugging Face Spaces expects
20
  EXPOSE 7860
21
 
22
- # Command to run the FastAPI app on Hugging Face Spaces
23
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
3
  # Set working directory
4
  WORKDIR /app
5
 
6
+ # Copy application files
7
+ COPY . /app
8
+
9
  # Install system dependencies
10
  RUN apt-get update && apt-get install -y \
11
+ gcc \
12
+ libsndfile1 \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Install Python dependencies
 
 
 
16
  RUN pip install --upgrade pip
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
 
 
19
  EXPOSE 7860
20
 
21
+ # Use gunicorn to run the app
22
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]