From 4229b47df17895843bd9abddc7a330574cfff1fe Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Thu, 21 Aug 2025 15:32:02 +0800 Subject: [PATCH] build: init py3 in base image. --- installer/Dockerfile | 1 + installer/Dockerfile-base | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/installer/Dockerfile b/installer/Dockerfile index da7b20e43..a109460da 100644 --- a/installer/Dockerfile +++ b/installer/Dockerfile @@ -18,6 +18,7 @@ COPY --chmod=700 . /opt/maxkb-app WORKDIR /opt/maxkb-app RUN rm -rf /opt/maxkb-app/ui && \ pip install uv --break-system-packages && \ + . /opt/py3/bin/activate && \ uv pip install -r pyproject.toml && \ find /opt/maxkb-app -depth \( -name ".git*" -o -name ".docker*" -o -name ".idea*" -o -name ".editorconfig*" -o -name ".prettierrc*" -o -name "README.md" -o -name "poetry.lock" -o -name "pyproject.toml" \) -exec rm -rf {} + && \ export MAXKB_CONFIG_TYPE=ENV && python3 /opt/maxkb-app/apps/manage.py compilemessages && \ diff --git a/installer/Dockerfile-base b/installer/Dockerfile-base index 1607f6d4f..4874acde1 100644 --- a/installer/Dockerfile-base +++ b/installer/Dockerfile-base @@ -1,8 +1,6 @@ FROM python:3.11-slim-trixie AS python-stage -RUN mkdir -p /opt/maxkb-app && \ - cd /opt/maxkb-app && \ - python3 -m venv /opt/py3 && \ - . /opt/py3/bin/activate +RUN python3 -m venv /opt/py3 + FROM ghcr.io/1panel-dev/maxkb-vector-model:v2.0.2 AS vector-model