Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple versions of python in parallel #102

Merged
merged 3 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Aelire marked this conversation as resolved.
Show resolved Hide resolved
[submodule "wwrando-mixed-pools"]
path = wwrando-mixed-pools
url = https://github.com/wooferzfg/wwrando.git
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
9 changes: 7 additions & 2 deletions setup-wwrando.sh
Original file line number Diff line number Diff line change
@@ -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