Spaces:
Sleeping
Sleeping
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +16 -1
Dockerfile
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY requirements.txt .
|
|
|
|
|
|
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
|
|
|
|
| 8 |
COPY . .
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Python 3.10 for stability
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Force cache busting to ensure no legacy layers (pydub) persist
|
| 8 |
+
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 9 |
+
PYTHONUNBUFFERED=1 \
|
| 10 |
+
CACHEBUST=2025
|
| 11 |
+
|
| 12 |
+
# Copy requirements first for better caching
|
| 13 |
COPY requirements.txt .
|
| 14 |
+
|
| 15 |
+
# Install dependencies
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
+
# Copy the rest of the application
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
+
# Set environment to use HuggingFace cache
|
| 22 |
+
ENV HF_HOME=/data/.huggingface
|
| 23 |
+
|
| 24 |
+
# Run the application
|
| 25 |
+
CMD ["python", "app.py"]
|