Spaces:
Sleeping
Sleeping
Pratyush Maini
commited on
Commit
·
a4046ab
1
Parent(s):
43e0eaa
Fix Space build: replace libgl1-mesa-glx with libgl1; add Dockerfile; add gradio dependency
Browse files- Dockerfile +34 -0
- requirements.txt +2 -1
Dockerfile
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
# Prevent interactive prompts during apt installs
|
| 4 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
+
|
| 6 |
+
# System deps (avoid deprecated libgl1-mesa-glx on Debian trixie)
|
| 7 |
+
RUN apt-get update \
|
| 8 |
+
&& apt-get install -y --no-install-recommends \
|
| 9 |
+
git \
|
| 10 |
+
git-lfs \
|
| 11 |
+
ffmpeg \
|
| 12 |
+
libsm6 \
|
| 13 |
+
libxext6 \
|
| 14 |
+
libgl1 \
|
| 15 |
+
cmake \
|
| 16 |
+
rsync \
|
| 17 |
+
&& rm -rf /var/lib/apt/lists/* \
|
| 18 |
+
&& git lfs install
|
| 19 |
+
|
| 20 |
+
WORKDIR /app
|
| 21 |
+
|
| 22 |
+
# Install Python deps first for better layer caching
|
| 23 |
+
COPY requirements.txt ./
|
| 24 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 25 |
+
|
| 26 |
+
# Copy app code
|
| 27 |
+
COPY app.py ./
|
| 28 |
+
|
| 29 |
+
# Gradio/Spaces defaults
|
| 30 |
+
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 31 |
+
EXPOSE 7860
|
| 32 |
+
|
| 33 |
+
CMD ["python", "app.py"]
|
| 34 |
+
|
requirements.txt
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
-
huggingface_hub==0.25.2
|
|
|
|
|
|
| 1 |
+
huggingface_hub==0.25.2
|
| 2 |
+
gradio>=4.0,<5
|