Spaces:
Paused
Paused
Download Dockerfile from dan92/chaton2api1: direct link, hf CLI and curl.
- Browser
- Download file 412 Bytes
-
https://huggingface.co/spaces/dan92/chaton2api1/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/dan92/chaton2api1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/dan92/chaton2api1/resolve/main/Dockerfile
412 Bytes
| # 使用官方Python基础镜像 | |
| FROM python:3.9-slim | |
| # 设置工作目录 | |
| WORKDIR /app | |
| RUN mkdir -p /app/images && \ | |
| chmod -R 777 /app | |
| # 复制当前目录下的所有文件到容器的/app目录 | |
| COPY . . | |
| # 安装所需的Python库 | |
| RUN pip install --no-cache-dir fastapi uvicorn httpx pydantic requests | |
| # 设置环境变量(可选) | |
| ENV PYTHONUNBUFFERED=1 | |
| # 运行main.py | |
| CMD ["python", "main.py"] | |