taMASRIBERTs / Dockerfile
T0KII's picture
Update Dockerfile
66e3db4 verified
Raw
History Blame Contribute Delete
789 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 curl \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
# Install PyTorch first (CPU version – works on both CPU and GPU Spaces)
# For GPU support on T4, use the CUDA 12.4 version (replace with your needs)
RUN pip install --no-cache-dir torch>=2.0.0 --index-url https://download.pytorch.org/whl/cpu
# Copy requirements and install remaining Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt \
gradio[oauth,mcp]==5.29.1 \
"uvicorn>=0.14.0" "websockets>=10.4" \
spaces mcp==1.8.1
# Copy application code
COPY . .
EXPOSE 7860
CMD ["python", "app.py"]