ForcePilot/docker/api.Dockerfile
2025-02-25 14:45:28 +08:00

20 lines
584 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 python:3.12
# 设置工作目录
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
RUN pip install -U gunicorn -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN apt-get clean
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
# 复制代码到容器中
COPY ../src /app/src