math / dockerfile
ramedde's picture
Create dockerfile
1d03122 verified
Raw
History Blame
818 Bytes
FROM python:3.13
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
git-lfs \
ffmpeg \
libsm6 \
libxext6 \
cmake \
rsync \
libgl1 \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
# Create user and working directory
RUN useradd -m -u 1000 user
WORKDIR /app
# Upgrade pip
RUN pip install --no-cache-dir pip -U
# Copy and install YOUR requirements first (with gradio 5.29.0)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install HF Space runtime deps
RUN pip install --no-cache-dir \
"huggingface-hub>=0.30" \
"hf-transfer>=0.1.4" \
"protobuf<4" \
"click<8.1" \
uvicorn \
websockets \
spaces
# Copy app files
COPY --chown=user . /app
USER user
EXPOSE 7860
CMD ["python", "app.py"]