Download Dockerfile from coium/akash2api: direct link, hf CLI and curl.
- Browser
- Download file 465 Bytes
-
https://huggingface.co/spaces/coium/akash2api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/coium/akash2api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/coium/akash2api/resolve/main/Dockerfile
465 Bytes
| # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker | |
| # you will also find guides on how best to write your Dockerfile | |
| FROM python:3.9-slim | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 复制应用代码 | |
| COPY . . | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # 暴露端口 | |
| EXPOSE 5200 | |
| # 健康检查 | |
| HEALTHCHECK --interval=30s --timeout=5s \ | |
| CMD curl -f http://localhost:5200/v1/models || exit 1 | |
| # 运行应用 | |
| CMD ["python", "app.py"] | |