Spaces:
Sleeping
Sleeping
Download Dockerfile from userIdc2024/call-bot: direct link, hf CLI and curl.
- Browser
- Download file 937 Bytes
-
https://huggingface.co/spaces/userIdc2024/call-bot/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/userIdc2024/call-bot/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/userIdc2024/call-bot/resolve/main/Dockerfile
937 Bytes
| # Dockerfile used on Hugging Face Spaces (deploy_hf.py uploads it as "Dockerfile"). | |
| FROM python:3.12-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/* | |
| # Spaces run the container as user 1000 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH | |
| WORKDIR /home/user/app | |
| COPY --chown=user requirements.txt requirements-local.txt ./ | |
| RUN pip install --no-cache-dir --user -r requirements.txt -r requirements-local.txt | |
| COPY --chown=user . . | |
| # Live DB on local disk; snapshots + clips live in the storage bucket mounted at /data | |
| ENV PORT=7860 \ | |
| DB_PATH=/home/user/app/data/calls.db \ | |
| DB_BACKUP_DIR=/data/db \ | |
| CLIPS_BASE=/data \ | |
| CONFIG_PATH=/data/config.yaml \ | |
| PYTHONUNBUFFERED=1 | |
| EXPOSE 7860 | |
| CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT} --proxy-headers --forwarded-allow-ips='*' --ws-ping-interval 20"] | |