Spaces:
Sleeping
Sleeping
Download Dockerfile from maxdemarzi/black-swan-sql-proxy: direct link, hf CLI and curl.
- Browser
- Download file 669 Bytes
-
https://huggingface.co/spaces/maxdemarzi/black-swan-sql-proxy/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/maxdemarzi/black-swan-sql-proxy/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/maxdemarzi/black-swan-sql-proxy/resolve/main/Dockerfile
669 Bytes
| FROM python:3.12-slim | |
| # Hugging Face runs the container as uid 1000 and $HOME must be writable, or | |
| # httpx and friends fail trying to create a cache directory at startup. | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --user -r requirements.txt | |
| COPY --chown=user app.py . | |
| # 7860 is the port the platform proxies. Single worker on purpose: the rate | |
| # limiter counts in process memory, and a second worker would silently double | |
| # the limit. | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] | |