Download Dockerfile from Chungulus/brain-lab: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/spaces/Chungulus/brain-lab/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Chungulus/brain-lab/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Chungulus/brain-lab/resolve/main/Dockerfile
1.1 kB
| FROM python:3.11-slim-bookworm | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| default-jdk-headless ffmpeg libsndfile1 libgomp1 ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /home/user/app | |
| RUN python -m pip install --no-cache-dir --index-url https://download.pytorch.org/whl/cpu \ | |
| torch==2.6.0 torchvision==0.21.0 | |
| COPY requirements.txt ./requirements.txt | |
| RUN python -m pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user:user . . | |
| USER user | |
| ENV PYTHONUNBUFFERED=1 HF_HUB_DISABLE_IMPLICIT_TOKEN=1 \ | |
| OMP_NUM_THREADS=2 OPENBLAS_NUM_THREADS=2 MKL_NUM_THREADS=2 \ | |
| TOKENIZERS_PARALLELISM=false BRAIN_LAB_THREADS=2 | |
| RUN python -c "from huggingface_hub import snapshot_download; snapshot_download('openai/whisper-tiny.en', revision='87c7102498dcde7456f24cfd30239ca606ed9063', local_dir='brain_lab/models/hf/speech', allow_patterns=['*.json','*.txt','model.safetensors'], token=False)" | |
| EXPOSE 7860 | |
| CMD ["python", "-m", "uvicorn", "space_app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--no-access-log"] | |