From 11fc7b4b1e400a479be78630b5bc7f768837e52e Mon Sep 17 00:00:00 2001 From: Erilea Date: Sat, 23 Mar 2024 16:42:09 +0100 Subject: [PATCH 1/3] Install python3.12 and 3.10 in parallel This should let us run multiple versions of the randomizer with incompatible python versions in the same bot container --- Dockerfile | 8 +++++++- setup-wwrando.sh | 9 +++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5f08caa..b2cf05f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,10 @@ -FROM python:3.10-buster +# This is the default version under which randobot will run +FROM python:3.12-bookworm + +# Copy python from the source image for any additional version we need to support +COPY --from=python:3.10-bookworm /usr/local/bin/python3 /usr/local/bin/python3.10 +COPY --from=python:3.10-bookworm /usr/local/lib/libpython3.10.so.1.0 /usr/local/lib/libpython3.10.so.1.0 +COPY --from=python:3.10-bookworm /usr/local/lib/python3.10/ /usr/local/lib/python3.10 WORKDIR /tww-rando-bot diff --git a/setup-wwrando.sh b/setup-wwrando.sh index c51c144..0438ac1 100755 --- a/setup-wwrando.sh +++ b/setup-wwrando.sh @@ -1,7 +1,12 @@ #!/bin/bash -ex -for rando in wwrando wwrando-dev-tanjo3 wwrando-random-settings wwrando-mixed-pools; do +for rando in wwrando wwrando-dev-tanjo3; do (cd $rando && - python -m venv /venv/$rando --upgrade-deps && + python3.10 -m venv /venv/$rando --upgrade-deps && + /venv/$rando/bin/pip install --no-cache-dir -r requirements.txt) +done +for rando in wwrando-mixed-pools wwrando-random-settings; do + (cd $rando && + python3.12 -m venv /venv/$rando --upgrade-deps && /venv/$rando/bin/pip install --no-cache-dir -r requirements.txt) done From c2e42ffb65c96dc0997b5b12c99d35a7cb40ca10 Mon Sep 17 00:00:00 2001 From: Erilea Date: Sat, 23 Mar 2024 18:50:22 +0100 Subject: [PATCH 2/3] Update wwrando-random-settings --- .gitmodules | 2 +- wwrando-random-settings | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 43f50f6..ba21db8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,7 +9,7 @@ [submodule "wwrando-random-settings"] path = wwrando-random-settings url = https://github.com/Aelire/wwrando.git - branch = randobot-support + branch = randobot-support-keep-gclib [submodule "wwrando-mixed-pools"] path = wwrando-mixed-pools url = https://github.com/wooferzfg/wwrando.git diff --git a/wwrando-random-settings b/wwrando-random-settings index 9b5690d..194c120 160000 --- a/wwrando-random-settings +++ b/wwrando-random-settings @@ -1 +1 @@ -Subproject commit 9b5690d7005e049ba4810980db96ceddc0fcff70 +Subproject commit 194c120d0aa3a3a202dfd0f9d90fe2fc49ec2661 From a6adf0107a0e1d1e35ab0db05e60e81a27e4ec66 Mon Sep 17 00:00:00 2001 From: wooferzfg Date: Sat, 23 Mar 2024 20:55:24 -0400 Subject: [PATCH 3/3] Update wwrando-mixed-pools --- wwrando-mixed-pools | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wwrando-mixed-pools b/wwrando-mixed-pools index 2456b19..670ed9c 160000 --- a/wwrando-mixed-pools +++ b/wwrando-mixed-pools @@ -1 +1 @@ -Subproject commit 2456b190f9c5f0cb8be63860bed8d2b7d23bf716 +Subproject commit 670ed9c3c46e01b5c8186680ddf450189e8854e2