Spaces:
Sleeping
Sleeping
usmanyousaf
commited on
Update Dockerfile
Browse files- 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 |
-
|
9 |
-
|
10 |
&& rm -rf /var/lib/apt/lists/*
|
11 |
|
12 |
-
#
|
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 |
-
#
|
23 |
-
CMD ["
|
|
|
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"]
|