fix(docker): Fix build arm image bug

This commit is contained in:
Fangyin Cheng
2025-03-12 11:00:36 +08:00
parent 150f33bd26
commit 361fde6697
3 changed files with 9 additions and 4 deletions

View File

@@ -43,6 +43,7 @@ jobs:
build-args: |
BASE_IMAGE=ubuntu:22.04
EXTRAS=base,proxy_openai,rag,graph_rag,storage_chromadb,dbgpts,proxy_ollama,proxy_zhipuai,proxy_anthropic,proxy_qianfan,proxy_tongyi
platforms: linux/amd64,linux/arm64,linux/arm/v7
PIP_INDEX_URL=https://pypi.org/simple
platforms: linux/arm64,linux/amd64
push: true
tags: eosphorosai/dbgpt-openai:${{ github.ref_name }},eosphorosai/dbgpt-openai:latest

View File

@@ -40,6 +40,8 @@ jobs:
with:
context: .
file: ./docker/base/Dockerfile
build-args: |
PIP_INDEX_URL=https://pypi.org/simple
platforms: linux/amd64
push: true
tags: eosphorosai/dbgpt:${{ github.ref_name }},eosphorosai/dbgpt:latest

View File

@@ -7,6 +7,7 @@ ARG BASE_IMAGE
ARG PYTHON_VERSION=3.11
# Use Tsinghua PyPI mirror, It's faster in most countries
ARG PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
ARG UV_HTTP_TIMEOUT=180
ARG EXTRAS="base,proxy_openai,rag,storage_chromadb,cuda121,hf,quant_bnb,dbgpts"
ARG VERSION=latest
ARG USE_TSINGHUA_UBUNTU
@@ -16,6 +17,7 @@ ENV PYTHONUNBUFFERED=1 \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PIP_INDEX_URL=${PIP_INDEX_URL} \
UV_HTTP_TIMEOUT=${UV_HTTP_TIMEOUT} \
CMAKE_ARGS=${CMAKE_ARGS}
# Configure apt sources based on the USE_TSINGHUA_UBUNTU parameter
@@ -31,8 +33,6 @@ RUN if [ "$USE_TSINGHUA_UBUNTU" = "true" ]; then \
python${PYTHON_VERSION}-dev \
python${PYTHON_VERSION}-venv \
python3-pip \
python3-dev \
python3-virtualenv \
git \
curl \
wget \
@@ -63,7 +63,9 @@ COPY packages /app/packages
# Install dependencies with uv and install all local packages
RUN --mount=type=cache,target=/root/.cache/uv \
extras=$(echo $EXTRAS | tr ',' '\n' | while read extra; do echo "--extra $extra"; done | tr '\n' ' ') && \
uv sync --frozen --all-packages --no-dev $extras && \
uv sync --frozen --all-packages \
--no-dev $extras \
--index-url=$PIP_INDEX_URL && \
# Verify installation
python -c "import dbgpt; print(dbgpt.__version__)"
ARG LANGUAGE="en"