Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +15 -11
Dockerfile
CHANGED
|
@@ -1,25 +1,29 @@
|
|
| 1 |
-
# Use official
|
| 2 |
-
|
|
|
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
COPY requirements.txt .
|
| 9 |
-
|
| 10 |
-
# Install dependencies
|
| 11 |
RUN apt-get update && apt-get install -y \
|
| 12 |
-
|
| 13 |
-
libsndfile1 \
|
| 14 |
ffmpeg \
|
|
|
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
| 19 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
# Copy app code
|
| 22 |
COPY . .
|
| 23 |
|
| 24 |
-
#
|
|
|
|
|
|
|
|
|
|
| 25 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
# Use official PyTorch image with CUDA support if GPU, or CPU-only
|
| 2 |
+
ARG BASE_IMAGE=python:3.10-slim
|
| 3 |
+
FROM ${BASE_IMAGE}
|
| 4 |
|
| 5 |
# Set working directory
|
| 6 |
WORKDIR /app
|
| 7 |
|
| 8 |
+
# Install system dependencies
|
|
|
|
|
|
|
|
|
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
+
git \
|
|
|
|
| 11 |
ffmpeg \
|
| 12 |
+
libsndfile1 \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
+
# Copy requirements
|
| 16 |
+
COPY requirements.txt .
|
| 17 |
+
|
| 18 |
+
# Install Python dependencies
|
| 19 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 20 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
# Copy app code
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
+
# Expose port for Gradio
|
| 26 |
+
EXPOSE 7860
|
| 27 |
+
|
| 28 |
+
# Start the app
|
| 29 |
CMD ["python", "app.py"]
|