build: init py3 in base image.

This commit is contained in:
liqiang-fit2cloud 2025-08-21 15:32:02 +08:00
parent ae5fb8fae3
commit 4229b47df1
2 changed files with 3 additions and 4 deletions

View File

@ -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 && \

View File

@ -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