usmanyousaf commited on
Commit
a13d6d0
·
verified ·
1 Parent(s): eb61e45

Update Dockerfile

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