Download Dockerfile from rjattt/echofocus: direct link, hf CLI and curl.
- Browser
- Download file 990 Bytes
-
https://huggingface.co/spaces/rjattt/echofocus/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/rjattt/echofocus/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/rjattt/echofocus/resolve/main/Dockerfile
990 Bytes
| FROM python:3.11-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libsndfile1 \ | |
| ffmpeg \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Hugging Face Spaces & standard non-root container user (UID 1000) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PORT=7860 \ | |
| OMP_NUM_THREADS=2 \ | |
| MKL_NUM_THREADS=2 \ | |
| OPENBLAS_NUM_THREADS=2 | |
| WORKDIR $HOME/app | |
| # Upgrade pip and install CPU torch wheels | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir \ | |
| --index-url https://download.pytorch.org/whl/cpu \ | |
| torch torchaudio | |
| COPY --chown=user:user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user:user . . | |
| # Download trained checkpoints during build so container starts instantly | |
| RUN python scripts/download_weights.py | |
| EXPOSE 7860 | |
| CMD ["sh", "-c", "python server.py --host 0.0.0.0 --port ${PORT:-7860}"] | |