Nine8 / Dockerfile
ljx77qaq's picture
Update Dockerfile
fc7f22e verified
raw
history blame contribute delete
350 Bytes
FROM python:3.11-slim
WORKDIR /app
# 复制依赖文件并安装
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制当前目录下的所有代码到容器内
COPY . .
# 暴露 HF 要求的 7860 端口
EXPOSE 7860
# 使用 uvicorn 启动 FastAPI
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]