Automatically select the right Python version in Docker environment#95
Automatically select the right Python version in Docker environment#95cedricrupb wants to merge 2 commits intosoarsmu:masterfrom
Conversation
|
How the different python versions should be handled within in the container, is described here by the author of the docker file: #92 (comment) |
|
Thanks! I tried this at first, but |
There was a problem hiding this comment.
You're a right, uv has no 3.6. I tried it in the container:
root@0dfedf7f77dd:/home# uv python install 3.6
error: No download found for request: cpython-3.6-linux-x86_64-gnu
Yes, the python version for a bug have to be still picked manually, as far as I know. Your patch in the bugsinpy-compile looks nice. Should that also work outside the container, if I have the required python version installed (e.g., if I have python3.6 in my search path)?
| RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates git dos2unix vim bzip2 | ||
|
|
||
| # Download the latest installer | ||
| ADD https://astral.sh/uv/install.sh /uv-installer.sh |
There was a problem hiding this comment.
If uv is not used for installing the different python versions, as it does not support version 3.6, I would suggest removing it from the image (Line 7 to 13 including). Or does micromamba needs it?
| @@ -1,16 +1,42 @@ | |||
| FROM python:3.12-slim-trixie | |||
| FROM python:3.9-slim-trixie | |||
There was a problem hiding this comment.
The version of the image self was chosen based on the uv documentation (see #92 (comment)). Maybe now the image from the micromamba documentation is suitable for this Dockerfile? If not, a Debian slim image (without a python) would be enough, if micromamba does not need a Python version itself.
…not bug triggering)
Hey!
When trying to reproduce some bugs, I noticed that some bugs could not be reproduced under Python 3.12. (or even Python 3.9) and required the specific Python version to be installed. This problem is also well documented here.
I think it would be nice to have a Docker environment that automatically "compiles" the code with the right Python version. Therefore, I started to prepare the pull request.
I mark this as a draft because I did not completely tested it on all bugs by now, but please let me know if you have any concerns with this change.
Best,
Cedric