| FROM python:3.13 |
|
|
| |
| 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 |
|
|
| |
| RUN useradd -m -u 1000 user |
| WORKDIR /app |
|
|
| |
| RUN pip install --no-cache-dir pip -U |
|
|
| |
| COPY requirements.txt . |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| RUN pip install --no-cache-dir \ |
| "huggingface-hub>=0.30" \ |
| "hf-transfer>=0.1.4" \ |
| "protobuf<4" \ |
| "click<8.1" \ |
| uvicorn \ |
| websockets \ |
| spaces |
|
|
| |
| COPY --chown=user . /app |
|
|
| USER user |
|
|
| EXPOSE 7860 |
|
|
| CMD ["python", "app.py"] |