Skip to content

Commit c91e276

Browse files
Aelirewooferzfg
andauthored
Support multiple versions of python in parallel (#102)
* 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 * Update wwrando-random-settings * Update wwrando-mixed-pools --------- Co-authored-by: wooferzfg <spapushin@gmail.com>
1 parent 599ec68 commit c91e276

5 files changed

+17
-6
lines changed

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[submodule "wwrando-random-settings"]
1010
path = wwrando-random-settings
1111
url = https://github.com/Aelire/wwrando.git
12-
branch = randobot-support
12+
branch = randobot-support-keep-gclib
1313
[submodule "wwrando-mixed-pools"]
1414
path = wwrando-mixed-pools
1515
url = https://github.com/wooferzfg/wwrando.git

Dockerfile

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
FROM python:3.10-buster
1+
# This is the default version under which randobot will run
2+
FROM python:3.12-bookworm
3+
4+
# Copy python from the source image for any additional version we need to support
5+
COPY --from=python:3.10-bookworm /usr/local/bin/python3 /usr/local/bin/python3.10
6+
COPY --from=python:3.10-bookworm /usr/local/lib/libpython3.10.so.1.0 /usr/local/lib/libpython3.10.so.1.0
7+
COPY --from=python:3.10-bookworm /usr/local/lib/python3.10/ /usr/local/lib/python3.10
28

39
WORKDIR /tww-rando-bot
410

setup-wwrando.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/bin/bash -ex
22

3-
for rando in wwrando wwrando-dev-tanjo3 wwrando-random-settings wwrando-mixed-pools; do
3+
for rando in wwrando wwrando-dev-tanjo3; do
44
(cd $rando &&
5-
python -m venv /venv/$rando --upgrade-deps &&
5+
python3.10 -m venv /venv/$rando --upgrade-deps &&
6+
/venv/$rando/bin/pip install --no-cache-dir -r requirements.txt)
7+
done
8+
for rando in wwrando-mixed-pools wwrando-random-settings; do
9+
(cd $rando &&
10+
python3.12 -m venv /venv/$rando --upgrade-deps &&
611
/venv/$rando/bin/pip install --no-cache-dir -r requirements.txt)
712
done

0 commit comments

Comments
 (0)