Spaces:
Sleeping
Sleeping
Rajan Sharma
commited on
Create Dockerfile
Browse files- Dockerfile +24 -0
Dockerfile
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
ENV PIP_NO_CACHE_DIR=1 \
|
| 4 |
+
HF_HUB_DISABLE_SYMLINKS_WARNING=1
|
| 5 |
+
|
| 6 |
+
# Use libgl1 (NOT libgl1-mesa-glx) to avoid Debian trixie breakage
|
| 7 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 8 |
+
git git-lfs ffmpeg libsm6 libxext6 libgl1 cmake rsync curl \
|
| 9 |
+
&& git lfs install \
|
| 10 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
+
|
| 12 |
+
WORKDIR /app
|
| 13 |
+
|
| 14 |
+
# Install Python deps
|
| 15 |
+
COPY requirements.txt /app/requirements.txt
|
| 16 |
+
RUN python -m pip install --upgrade pip \
|
| 17 |
+
&& pip install --no-cache-dir -r /app/requirements.txt
|
| 18 |
+
|
| 19 |
+
# Copy the app code
|
| 20 |
+
COPY . /app
|
| 21 |
+
|
| 22 |
+
# Spaces auto-assigns $PORT; Gradio binds to it automatically
|
| 23 |
+
EXPOSE 7860
|
| 24 |
+
CMD ["python", "app.py"]
|