Skip to content

Commit 451f22d

Browse files
[ci] [cross-arch] Allow creating venvs with python 3.11
This commit adds python3.11-venv to the cross-arch container image for arm64+python3.11. This allows us to create venvs with python 3.11. This commit also adds a symlink from python3.11 to python3. This is needed because we want users of this image to use python3.11 as the default python3 version. Signed-off-by: Tiyash Basu <[email protected]>
1 parent 7ae8e31 commit 451f22d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/containers/nox-cross-arch/arm64-ubuntu-20.04-python-3.11.Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,21 @@ RUN apt-get update -y && \
1818
curl \
1919
git \
2020
python3.11 \
21-
python3.11-distutils && \
21+
python3.11-distutils \
22+
python3.11-venv && \
2223
apt-get clean && \
2324
rm -rf /var/lib/apt/lists/*
2425

2526
# Install pip
2627
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11
2728

29+
# Link python3.11 to python and python3.
30+
# This is needed because we want users of this image to use python3.11 as the
31+
# default python version.
2832
RUN update-alternatives --install \
2933
/usr/local/bin/python python /usr/bin/python3.11 1 && \
34+
update-alternatives --install \
35+
/usr/local/bin/python3 python3 /usr/bin/python3.11 1 && \
3036
python -m pip install --upgrade --no-cache-dir pip
3137

3238
COPY entrypoint.bash /usr/bin/entrypoint.bash

0 commit comments

Comments
 (0)