Download Dockerfile from esdsd666/11223: direct link, hf CLI and curl.
- Browser
- Download file 430 Bytes
-
https://huggingface.co/spaces/esdsd666/11223/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/esdsd666/11223/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/esdsd666/11223/resolve/main/Dockerfile
430 Bytes
| # 使用官方 Python 镜像作为基础 | |
| FROM python:3.9-slim | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 将 requirements.txt 复制到工作目录并安装依赖 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 将应用程序代码复制到工作目录 | |
| COPY . . | |
| # 暴露应用程序运行的端口 | |
| EXPOSE 7860 | |
| # 定义启动命令 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |