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

Conversation

Aelire
Copy link
Contributor

@Aelire Aelire commented Mar 23, 2024

The idea is to use Docker multi-stage builds to bring python from multiple images into a single image

The base image (the first FROM at the top of the Dockerfile) will bring in the /usr/local/bin/python3 symlink, so for things running outside a venv like the rando bot itself, that will be the version used
The other versions only have a /usr/local/bin/python<version> executable and need to be called with a full version name. Here that's only 3.10 but we could include any other version for which there is an official docker image with the same construct in the future. The process is somewhat manual/copy-pasty but shouldn't be too difficult to maintain, since python installations are fairly self-contained with a binary, a shared library and everything else in the /usr/lib/python<version> directory (this has been true since at least python2 as far as I can tell)

I've tested this under python 3.12 for randobot and wwrando-random-settings with the gclib/python3.12 patches removed in this test race: https://racetime.gg/twwr/hyper-molgera-4964

This should let us run multiple versions of the randomizer with
incompatible python versions in the same bot container
.gitmodules Show resolved Hide resolved
@wooferzfg
Copy link
Owner

Prior to merging this, I'll push a change to update the mixed pools build branch with the same change

@Aelire Aelire marked this pull request as ready for review March 25, 2024 21:56
@wooferzfg wooferzfg merged commit c91e276 into wooferzfg:main Mar 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants