Download Dockerfile from kavein44/test2: direct link, hf CLI and curl.
- Browser
- Download file 405 Bytes
-
https://huggingface.co/spaces/kavein44/test2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/kavein44/test2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/kavein44/test2/resolve/main/Dockerfile
405 Bytes
| # 使用官方 Python 运行时作为基础镜像 | |
| FROM python:3.9-slim-buster | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 将当前目录的内容复制到容器的 /app 目录中 | |
| COPY . /app | |
| # 安装 requirements.txt 中指定的依赖 | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 暴露端口 (Hugging Face Spaces 使用 7860 作为默认端口) | |
| EXPOSE 7860 | |
| # 运行 app.py | |
| CMD ["python", "app.py"] |