| |
| FROM python:3.10-slim |
|
|
| WORKDIR /app |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| git \ |
| git-lfs \ |
| ffmpeg \ |
| libsm6 \ |
| libxext6 \ |
| cmake \ |
| rsync \ |
| libgl1 \ |
| build-essential \ |
| && rm -rf /var/lib/apt/lists/* \ |
| && git lfs install |
|
|
| RUN pip install --no-cache-dir -U pip setuptools wheel |
|
|
| |
| RUN pip install --no-cache-dir \ |
| datasets \ |
| "huggingface-hub>=0.30" \ |
| "hf-transfer>=0.1.4" \ |
| "protobuf<4" \ |
| "click<8.1" \ |
| "uvicorn>=0.14.0" \ |
| "websockets>=10.4" \ |
| spaces \ |
| "gradio[oauth,mcp]==6.9.0" |
|
|
| COPY requirements.txt /tmp/requirements.txt |
| |
| RUN sed -i '/flash_attn/d' /tmp/requirements.txt && \ |
| pip install --no-cache-dir -r /tmp/requirements.txt |
|
|
| COPY . . |
| CMD ["python", "app.py"] |