Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +21 -7
Dockerfile
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
# ✅
|
| 9 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
|
|
|
| 1 |
+
# ✅ Base image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# ✅ Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# ✅ Environment variables
|
| 8 |
+
ENV PYTHONUNBUFFERED=1 \
|
| 9 |
+
PYTHONDONTWRITEBYTECODE=1 \
|
| 10 |
+
HF_HOME=/tmp/huggingface \
|
| 11 |
+
TRANSFORMERS_CACHE=/tmp/huggingface \
|
| 12 |
+
HF_DATASETS_CACHE=/tmp/huggingface \
|
| 13 |
+
HF_HUB_CACHE=/tmp/huggingface
|
| 14 |
|
| 15 |
+
# ✅ Install system dependencies
|
| 16 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 17 |
+
build-essential \
|
| 18 |
+
ffmpeg \
|
| 19 |
+
git \
|
| 20 |
+
curl \
|
| 21 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 22 |
|
| 23 |
+
# ✅ Install Python dependencies
|
| 24 |
+
COPY requirements.txt .
|
| 25 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 26 |
|
| 27 |
+
# ✅ Create writable cache folder
|
| 28 |
+
RUN mkdir -p /tmp/hu
|