mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-28 23:32:48 +00:00
build: init py3 in base image.
This commit is contained in:
parent
4229b47df1
commit
a77da52ad4
|
|
@ -18,12 +18,11 @@ 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 && \
|
||||
python -m 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 && \
|
||||
export PIP_TARGET=/opt/maxkb-app/sandbox/python-packages && \
|
||||
uv pip install --target=$PIP_TARGET requests pymysql psycopg2-binary && \
|
||||
python -m uv pip install --target=$PIP_TARGET requests pymysql psycopg2-binary && \
|
||||
rm -rf /opt/maxkb-app/installer
|
||||
COPY --from=web-build --chmod=700 ui /opt/maxkb-app/ui
|
||||
|
||||
|
|
@ -48,7 +47,6 @@ ENV MAXKB_VERSION="${DOCKER_IMAGE_TAG} (build at ${BUILD_AT}, commit: ${GITHUB_C
|
|||
MAXKB_LOCAL_MODEL_HOST=127.0.0.1 \
|
||||
MAXKB_LOCAL_MODEL_PORT=11636 \
|
||||
MAXKB_LOCAL_MODEL_PROTOCOL=http \
|
||||
PATH=/opt/py3/bin:$PATH \
|
||||
PIP_TARGET=/opt/maxkb/python-packages
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
FROM python:3.11-slim-trixie AS python-stage
|
||||
RUN python3 -m venv /opt/py3
|
||||
|
||||
|
||||
FROM ghcr.io/1panel-dev/maxkb-vector-model:v2.0.2 AS vector-model
|
||||
|
||||
FROM postgres:17.6-trixie
|
||||
|
|
@ -38,7 +37,8 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
|||
rm -rf /var/lib/apt/lists/* /usr/share/doc/* /usr/share/man/* /usr/share/info/* /usr/share/locale/* /usr/share/lintian/* /usr/share/linda/* /var/cache/* /var/log/* /var/tmp/* /tmp/*
|
||||
COPY --from=vector-model --chmod=700 /opt/maxkb-app/model /opt/maxkb-app/model
|
||||
|
||||
ENV PGDATA=/opt/maxkb/data/postgresql/pgdata \
|
||||
ENV PATH=/opt/py3/bin:$PATH \
|
||||
PGDATA=/opt/maxkb/data/postgresql/pgdata \
|
||||
POSTGRES_USER=root \
|
||||
POSTGRES_PASSWORD=Password123@postgres \
|
||||
POSTGRES_MAX_CONNECTIONS=1000 \
|
||||
|
|
|
|||
Loading…
Reference in New Issue