Skip to content

Python 3.12 via uv rather than deadsnakes ppa#3050

Draft
rw251 wants to merge 1 commit into
mainfrom
rw/uv-python
Draft

Python 3.12 via uv rather than deadsnakes ppa#3050
rw251 wants to merge 1 commit into
mainfrom
rw/uv-python

Conversation

@rw251
Copy link
Copy Markdown
Contributor

@rw251 rw251 commented May 5, 2026

Swapping in "uv" to install python 3.12. This version of python is not available via apt install in the base docker image, so previously we used the deadsnakes ppa. This is a test to see if uv can do it instead to move away from this ppa dependency.

  • remove deadsnakes ppa
  • install uv by COPYing latest image from ghcr.io
  • use uv to install python3.12

Swapping in "uv" to install python 3.12. This version of python is not available via `apt install` in the base docker image, so previously we used the deadsnakes ppa. This is a test to see if uv can do it instead to move away from this ppa dependency.

- remove deadsnakes ppa
- install uv by COPYing latest image from ghcr.io
- use uv to install python3.12
Comment thread docker/Dockerfile

# Install everything in venv for isolation from system python libraries
RUN python3.12 -m venv /opt/venv
# Use uv to create and manage the venv directly - seed pip to allow python -m pip usage
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it not make more sense to go all in on UV so we don't need pip?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point in the tech incident channel thread it was mentioned that this could be a temporary change until the deadsnakes ppa is back - so this is a working version with minimal changes. The other PR about bumping to 24.04 is another alternative.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you go with this option, I'd suggest updating to the latest repo template for standardised uv docker things

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.

3 participants