safe-playground / Dockerfile
Pratyush Maini
Fix Space build: replace libgl1-mesa-glx with libgl1; add Dockerfile; add gradio dependency
a4046ab
raw
history blame
714 Bytes
FROM python:3.10-slim
# Prevent interactive prompts during apt installs
ENV DEBIAN_FRONTEND=noninteractive
# System deps (avoid deprecated libgl1-mesa-glx on Debian trixie)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
git-lfs \
ffmpeg \
libsm6 \
libxext6 \
libgl1 \
cmake \
rsync \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
WORKDIR /app
# Install Python deps first for better layer caching
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY app.py ./
# Gradio/Spaces defaults
ENV GRADIO_SERVER_NAME=0.0.0.0
EXPOSE 7860
CMD ["python", "app.py"]