ethanLeaderboard / Dockerfile
smile
change docker
9270913
raw
history blame contribute delete
400 Bytes
FROM python:3.9-slim
WORKDIR /code
# 复制项目文件
COPY ./requirements.txt /code/requirements.txt
COPY ./app /code/app
COPY ./utils /code/utils
COPY ./main.py /code/main.py
# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt
# 设置环境变量
ENV PYTHONPATH=/code
# 暴露端口
EXPOSE 7860
# 启动命令
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]