new-test / Dockerfile
hongshi-files's picture
Update Dockerfile
8f187d4 verified
raw
history blame contribute delete
316 Bytes
FROM python:3.10-slim
WORKDIR /code
# 安装依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制应用代码
COPY app.py .
# 设置默认端口(Spaces 会自动映射)
EXPOSE 7860
# 启动 FastAPI 应用
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]