ForcePilot/Dockerfile
2024-09-11 01:09:35 +08:00

18 lines
505 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用基础镜像
FROM pytorch/pytorch:2.4.1-cuda11.8-cudnn9-runtime
# 设置工作目录
WORKDIR /app
# 复制 requirements.txt 文件这一步如果文件没变Docker 会使用缓存)
COPY requirements.txt /app/requirements.txt
# 安装依赖Docker 会缓存这一步,除非 requirements.txt 发生变化)
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
# 复制代码到容器中
COPY ./src /app/src
# 运行应用
CMD ["python", "-m", "src.api"]