Repository navigation
Install gateway app with uv-managed Python 3.12 - #4439
Merged
Merged
Conversation
The gateway install script now provisions and updates gateways, recreating the inactive venv on Python 3.12 so existing gateways migrate off the OS Python 3.10. Part of #4423.
Older servers' update scripts install into the inactive venv with its pip, so a fresh host needs both. The uv cache was never pruned.
Installing the systemd service with sudo leaves root-owned bytecode in the venv, so the next update failed to remove it.
uv doesn't compile bytecode by default, so the app compiled it on the first start, which more than doubled the restart downtime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4423. Gateways run dstack on Ubuntu 22.04's system Python 3.10 and have no way to change it, which blocks dropping Python 3.10.
core/backends/base/resources/gateway_install.sh, used by cloud-init, the Kubernetes gateway pod, and the server's gateway updates.python_versionchanges migrate them the same way.uv pip install --compile-bytecodeand without a persistent uv cache, so updates are fast, the restart downtime doesn't grow, and the disk usage doesn't grow either.uv venv --seed), so the pip-based update script of an older server keeps working after a server downgrade.--rundockerpytest flag.--runallpytest flag enables all opt-in test groups, and CI uses it.