Spaces:
Running
Running
Download Dockerfile from HuggingFaceSwarms/PyBot: direct link, hf CLI and curl.
- Browser
- Download file 565 Bytes
-
https://huggingface.co/spaces/HuggingFaceSwarms/PyBot/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/HuggingFaceSwarms/PyBot/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/HuggingFaceSwarms/PyBot/resolve/main/Dockerfile
565 Bytes
| # A plain static file server: PyBot itself runs in the visitor's browser (Pyodide, see worker.js). | |
| # Docker rather than sdk: static because a static Space redirects large (LFS/Xet) files to a CDN without CORS | |
| # headers, which blocks the worker's fetch of the bot bundle and the @font-face fonts. | |
| FROM python:3.12-slim | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| WORKDIR /home/user/www | |
| COPY --chown=user index.html worker.js pybot_web.py tree.json pybot-*.zip ./ | |
| COPY --chown=user fonts ./fonts | |
| EXPOSE 7860 | |
| CMD ["python", "-m", "http.server", "7860", "--bind", "0.0.0.0"] | |