Download Dockerfile from cloudfom/mgg: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/spaces/cloudfom/mgg/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/cloudfom/mgg/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/cloudfom/mgg/resolve/main/Dockerfile
1.17 kB
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| ENV PYTHONUNBUFFERED=1 | |
| # System deps (FFmpeg 4.4 compatible) | |
| RUN apt-get update && apt-get install -y \ | |
| python3.10 \ | |
| python3.10-dev \ | |
| python3-pip \ | |
| git \ | |
| ffmpeg \ | |
| pkg-config \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libavcodec-dev \ | |
| libavformat-dev \ | |
| libavdevice-dev \ | |
| libavfilter-dev \ | |
| libavutil-dev \ | |
| libswscale-dev \ | |
| libswresample-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Make python default | |
| RUN ln -s /usr/bin/python3.10 /usr/bin/python | |
| # User | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH=/home/user/.local/bin:$PATH | |
| WORKDIR /app | |
| # Upgrade pip | |
| RUN pip install --upgrade pip setuptools wheel | |
| # Install torch (CPU) | |
| RUN pip install \ | |
| torch==2.1.0+cpu \ | |
| torchaudio==2.1.0+cpu \ | |
| --index-url https://download.pytorch.org/whl/cpu | |
| # Install audiocraft (NOW SUCCEEDS) | |
| RUN pip install \ | |
| git+https://github.com/facebookresearch/audiocraft.git@v1.3.0 | |
| # App deps | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app | |
| COPY --chown=user . /app | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |