Spaces:
Paused

11223 / Dockerfile
esdsd666's picture
Upload 2 files
7fc76e5 verified
Raw History Blame Contribute Delete
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"]