Spaces:
Paused
Paused
Download Dockerfile from 2Btainment/absolution-omega: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/spaces/2Btainment/absolution-omega/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/2Btainment/absolution-omega/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/2Btainment/absolution-omega/resolve/main/Dockerfile
1.57 kB
| FROM python:3.11-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends libsndfile1 ffmpeg git curl ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH \ | |
| ABSOLUTION_DATA_DIR=/data ABSOLUTION_FALLBACK_DIR=/tmp/omega_data \ | |
| ABSOLUTION_MAX_UPLOAD_MIB=200 \ | |
| ABSOLUTION_DEMUCS_REPO=/home/user/demucs_models ABSOLUTION_DEMUCS_MAX_SECONDS=120 \ | |
| OMP_NUM_THREADS=2 TORCH_HOME=/home/user/.cache/torch | |
| WORKDIR /home/user/app | |
| # CPU-only PyTorch + Demucs (demucs.api lives on the upstream main branch, not in PyPI 4.0.1) | |
| RUN pip install --no-cache-dir --user --index-url https://download.pytorch.org/whl/cpu \ | |
| torch==2.1.2 torchaudio==2.1.2 \ | |
| && pip install --no-cache-dir --user "numpy<2" \ | |
| "demucs @ git+https://github.com/adefossez/demucs@2883f3db65617d6d178c6ed10d869dc14e44e59b" | |
| # Official htdemucs v4 checkpoint, verified by SHA-256 at build time | |
| RUN mkdir -p $ABSOLUTION_DEMUCS_REPO && cd $ABSOLUTION_DEMUCS_REPO \ | |
| && curl -fsSL -o 955717e8-8726e21a.th https://dl.fbaipublicfiles.com/demucs/hybrid_transformer/955717e8-8726e21a.th \ | |
| && echo "8726e21a993978c7ba086d3872e7608d7d5bfca646ca4aca459ffda844faa8b4 955717e8-8726e21a.th" | sha256sum -c - \ | |
| && printf "models: ['955717e8']\n" > htdemucs.yaml | |
| COPY --chown=user pyproject.toml requirements.txt ./ | |
| COPY --chown=user app ./app | |
| RUN pip install --no-cache-dir --user . "numpy<2" | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.server:app", "--host", "0.0.0.0", "--port", "7860"] | |