Download Dockerfile from li2895/buddy2api: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/spaces/li2895/buddy2api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/li2895/buddy2api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/li2895/buddy2api/resolve/main/Dockerfile
369 Bytes
| FROM python:3.12-slim | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY server.py extract_token.py extract_token_remote.py get_token.py ./ | |
| # HF Spaces 需要监听 7860 端口,/data 是持久化目录 | |
| ENV PROXY_PORT=7860 | |
| ENV TOKEN_FILE_PATH=/data/token.json | |
| RUN mkdir -p /data | |
| EXPOSE 7860 | |
| CMD ["python", "server.py"] | |