File size: 789 Bytes
5496977
 
 
 
66e3db4
5496977
 
 
 
 
66e3db4
 
 
5496977
66e3db4
 
5496977
 
 
 
 
66e3db4
5496977
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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"]