Spaces:
Runtime error
Runtime error
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies (including wget for the runtime downloader) | |
| RUN apt-get update && apt-get install -y \ | |
| git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 wget build-essential \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && git lfs install | |
| RUN pip install --no-cache-dir --upgrade pip wheel setuptools | |
| # Install PyTorch 2.1.2 | |
| RUN pip install --no-cache-dir \ | |
| torch==2.1.2+cu118 torchvision==0.16.2+cu118 torchaudio==2.1.2+cu118 \ | |
| --index-url https://download.pytorch.org/whl/cu118 | |
| # Fix Chumpy | |
| RUN pip install --no-cache-dir --no-build-isolation chumpy | |
| # Install OpenMMLab | |
| RUN pip install --no-cache-dir openmim && \ | |
| mim install "mmcv==2.1.0" "mmdet==3.2.0" "mmpose==1.2.0" | |
| # Install Requirements | |
| COPY requirements.txt /tmp/requirements.txt | |
| RUN pip install --no-cache-dir -r /tmp/requirements.txt | |
| # Copy App Code | |
| COPY . /app | |
| # Setup Permissions | |
| RUN mkdir -p /home/user && \ | |
| ([ -e /home/user/app ] || ln -s /app/ /home/user/app) || true | |
| EXPOSE 7860 | |
| ENV GRADIO_SERVER_NAME="0.0.0.0" | |
| ENV GRADIO_SERVER_PORT=7860 | |
| CMD ["python", "webui.py"] | |