ForcePilot/docker/api.Dockerfile
Wenjie Zhang bb4ce9e5c2 feat: 更新 Docker 配置和服务说明,优化环境变量和服务命名
- 修改 docker-compose.yml,更新 PADDLEX_URI 环境变量,调整为 http://paddlex-ocr:8080。
- 更新 api.Dockerfile,优化代理环境变量的设置逻辑。
- 修改 paddlex.Dockerfile,更新工作目录和服务启动命令,确保使用新的配置文件。
- 新增 PP-StructureV3.yaml 配置文件,定义新的服务管道。
- 在 README.md 中添加服务说明,列出各服务及其端口信息,提升文档可读性。
2025-06-25 14:16:34 +08:00

41 lines
1.1 KiB
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 nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
COPY --from=ghcr.io/astral-sh/uv:0.7.2 /uv /uvx /bin/
# 设置工作目录
WORKDIR /app
# 环境变量设置
ARG http_proxy
ARG https_proxy
ENV TZ=Asia/Shanghai \
UV_LINK_MODE=copy
# 只有当代理变量不为空时才设置代理
RUN if [ -n "$http_proxy" ]; then echo "export http_proxy=$http_proxy" >> /etc/environment; fi
RUN if [ -n "$https_proxy" ]; then echo "export https_proxy=$https_proxy" >> /etc/environment; fi
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 安装系统依赖
RUN apt-get update && apt-get install -y \
python3-dev \
ffmpeg \
libsm6 \
libxext6
# 复制项目配置文件
COPY ../pyproject.toml /app/pyproject.toml
COPY ../.python-version /app/.python-version
# 安装依赖项不使用lock文件
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --no-install-project
# 复制代码到容器中
COPY ../src /app/src
COPY ../server /app/server
# 同步项目
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync