# HF Spaces Dockerfile — 锁定 Python 3.12 避免 tokenizers 编译失败 FROM python:3.12 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 COPY . /app WORKDIR /app RUN pip install --no-cache-dir pip -U \ && pip install --no-cache-dir datasets "huggingface-hub>=0.30" "hf-transfer>=0.1.4" RUN pip install --no-cache-dir -r requirements.txt \ "gradio[oauth]==4.44.1" "uvicorn>=0.14.0" "websockets>=10.4" spaces CMD ["python", "app.py"]