Download Dockerfile from 99i/t2c: direct link, hf CLI and curl.
- Browser
- Download file 437 Bytes
-
https://huggingface.co/spaces/99i/t2c/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/99i/t2c/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/99i/t2c/resolve/main/Dockerfile
437 Bytes
| # 使用官方的Python 3.9镜像作为基础镜像 | |
| FROM python:3.9 | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 将当前目录下的所有文件复制到工作目录中 | |
| COPY . . | |
| # 创建文件夹并赋予完全的读写权限 | |
| RUN mkdir -p /app/tmp && chmod -R 777 /app/tmp | |
| # 安装依赖 | |
| RUN pip install -r requirements.txt | |
| # 暴露端口 | |
| EXPOSE 8000 | |
| # 运行FastAPI应用 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] |