Add relocatable installs to support concurrency-safe cached environments#5509
Merged
charliermarsh merged 2 commits intomainfrom Jul 29, 2024
Merged
Add relocatable installs to support concurrency-safe cached environments#5509charliermarsh merged 2 commits intomainfrom
charliermarsh merged 2 commits intomainfrom
Conversation
6bcb8e1 to
67c2105
Compare
67c2105 to
ac91d4e
Compare
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.
Summary
The idea here is similar to what we do for wheels: we create the
CachedEnvironmentin thearchive-v0bucket, then symlink it to its content-addressed location. This ensures that we can always recreate these environments without concern for whether anyone else is accessing them.Part of the challenge here is that we want the virtual environments to be relocatable, because we're now building them in one location but persisting them in another. This requires that we write relative (rather than absolute) paths to scripts and entrypoints. The main risk with relocatable virtual environments is that the scripts and entrypoints themselves are not relocatable, because they use a relative shebang. But that's fine for cached environments, which are never intended to leave the cache.
Closes #5503.