Agent Zero AI framework
feat: Kali upgrade python3.13
linuztx33618bc030b4
diff --git a/docker/base/Dockerfile b/docker/base/Dockerfileindex 7e94ed80a..b51165a79 100644--- a/docker/base/Dockerfile+++ b/docker/base/Dockerfile@@ -24,6 +24,9 @@ RUN bash /ins/install_base_packages2.shRUN bash /ins/install_base_packages3.shRUN bash /ins/install_base_packages4.sh+# install pyenv+RUN bash /ins/install_pyenv.sh+# install python after packages to ensure version overridingRUN bash /ins/install_python.shdiff --git a/docker/base/fs/ins/install_pyenv.sh b/docker/base/fs/ins/install_pyenv.shnew file mode 100644index 000000000..c0051dc06--- /dev/null+++ b/docker/base/fs/ins/install_pyenv.sh@@ -0,0 +1,34 @@+#!/bin/bash+set -e++echo "====================PYENV START===================="++# Install pyenv build dependencies.+apt-get install -y --no-install-recommends \+ make build-essential libssl-dev zlib1g-dev libbz2-dev \+ libreadline-dev libsqlite3-dev wget curl llvm \+ libncursesw5-dev xz-utils tk-dev libxml2-dev \+ libxmlsec1-dev libffi-dev liblzma-dev++# Install pyenv for root user+git clone https://github.com/pyenv/pyenv.git /root/.pyenv++# Setup environment variables for pyenv to be available system-wide+cat > /etc/profile.d/pyenv.sh <<'EOF'+export PYENV_ROOT="/root/.pyenv"+export PATH="$PYENV_ROOT/bin:$PATH"+eval "$(pyenv init --path)"+EOF++chmod +x /etc/profile.d/pyenv.sh++# Source pyenv environment to make it available in this script+source /etc/profile.d/pyenv.sh++# Install Python 3.12.4+echo "====================PYENV INSTALLING PYTHON 3.12.4===================="+pyenv install 3.12.4++/root/.pyenv/versions/3.12.4/bin/python -m venv /opt/venv-a0++echo "====================PYENV END===================="\ No newline at end of filediff --git a/docker/base/fs/ins/install_python.sh b/docker/base/fs/ins/install_python.shindex 30ebce38b..152dec77f 100644--- a/docker/base/fs/ins/install_python.sh+++ b/docker/base/fs/ins/install_python.sh@@ -8,26 +8,26 @@ echo "====================PYTHON 3.12 & SID REPO===================="apt clean# ★ 1. Add sid repo & pin it for python 3.12-echo "deb http://deb.debian.org/debian sid main" > /etc/apt/sources.list.d/debian-sid.list-cat >/etc/apt/preferences.d/python312 <<'EOF'-Package: *-Pin: release a=sid-Pin-Priority: 100--Package: python3.12*-Pin: release a=sid-Pin-Priority: 990--# Prevent Python 3.13 from being installed-Package: python3.13*-Pin: release *-Pin-Priority: -1-EOF+# echo "deb http://deb.debian.org/debian sid main" > /etc/apt/sources.list.d/debian-sid.list+# cat >/etc/apt/preferences.d/python312 <<'EOF'+# Package: *+# Pin: release a=sid+# Pin-Priority: 100++# Package: python3.12*+# Pin: release a=sid+# Pin-Priority: 990++# # Prevent Python 3.13 from being installed+# Package: python3.13*+# Pin: release *+# Pin-Priority: -1+# EOFapt-get update && apt-get -y upgradeapt-get install -y --no-install-recommends \- python3.12 python3.12-venv python3.12-dev+ python3.13 python3.13-venv python3.13-dev# ★ 3. Switch the interpreter# update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.13 0@@ -40,7 +40,7 @@ echo "====================PYTHON OTHERS: $(ls /usr/bin/python*) "echo "====================PYTHON VENV===================="# create and activate default venv-python3.12 -m venv /opt/venv+python3.13 -m venv /opt/venvsource /opt/venv/bin/activate# upgrade pip and install static packagesdiff --git a/docker/base/fs/ins/install_searxng.sh b/docker/base/fs/ins/install_searxng.shindex a20f113de..65d0719a5 100644--- a/docker/base/fs/ins/install_searxng.sh+++ b/docker/base/fs/ins/install_searxng.sh@@ -5,7 +5,6 @@ echo "====================SEARXNG1 START===================="# Install necessary packagesapt-get install -y \- python3.12-dev python3.12-venv \git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev# python3.12-babel uwsgi uwsgi-plugin-python3diff --git a/docker/base/fs/ins/install_searxng2.sh b/docker/base/fs/ins/install_searxng2.shindex 5af4f2c9c..95023a5e2 100644--- a/docker/base/fs/ins/install_searxng2.sh+++ b/docker/base/fs/ins/install_searxng2.sh@@ -11,7 +11,7 @@ git clone "https://github.com/searxng/searxng" \echo "====================SEARXNG2 VENV===================="# create virtualenv:-python3.12 -m venv "/usr/local/searxng/searx-pyenv"+python3.13 -m venv "/usr/local/searxng/searx-pyenv"# make it defaultecho ". /usr/local/searxng/searx-pyenv/bin/activate" \@@ -23,7 +23,7 @@ source "/usr/local/searxng/searx-pyenv/bin/activate"echo "====================SEARXNG2 INST===================="# update pip's boilerplate-pip install --no-cache-dir -U pip setuptools wheel pyyaml+pip install --no-cache-dir -U pip setuptools wheel pyyaml lxml# jump to SearXNG's working tree and install SearXNG into virtualenvcd "/usr/local/searxng/searxng-src"diff --git a/docker/run/fs/ins/setup_venv.sh b/docker/run/fs/ins/setup_venv.shindex a0fdb8727..4f43a70fc 100644--- a/docker/run/fs/ins/setup_venv.sh+++ b/docker/run/fs/ins/setup_venv.sh@@ -7,5 +7,6 @@ set -e# python3.12 -m venv /opt/venv# source /opt/venv/bin/activate# else- source /opt/venv/bin/activate-# fi\ No newline at end of file+ # source /opt/venv/bin/activate+# fi+source /opt/venv-a0/bin/activate\ No newline at end of file