-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
singularity-tools: refactor and add runImageInLinuxVM
; apptainer.passthru.tests.exec-image-in-linux-vm: init
#268199
Draft
ShamrockLee
wants to merge
9
commits into
NixOS:master
Choose a base branch
from
ShamrockLee:singularity-tools-reusability
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
singularity-tools: refactor and add runImageInLinuxVM
; apptainer.passthru.tests.exec-image-in-linux-vm: init
#268199
ShamrockLee
wants to merge
9
commits into
NixOS:master
from
ShamrockLee:singularity-tools-reusability
Conversation
This file contains 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
Result of |
9042633
to
12d7c03
Compare
runImageInLinuxVM
; apptainer, singularity: add passthru.tests.exec-image-in-linux-vmrunImageInLinuxVM
; apptainer.passthru.tests.exec-image-in-linux-vm: init
@ofborg build apptainer.passthru.tests singularity.passthru.tests |
12d7c03
to
5b52b52
Compare
13 tasks
5b52b52
to
2fcbfe5
Compare
2fcbfe5
to
c5159c1
Compare
c5159c1
to
38e5850
Compare
Name the directory inside SIF (the SquashFS image) ".singularity.d" instead of ".${projectName}.d" for compatibility across Apptainer and Singularity.
Split the build steps used by buildImage into * buildSandboxFromContents * buildImageFromSandbox * buildImageInLinuxVM Attach buildScriptBin package to the passthru of each of the returned package (except for those returned by *InLinuxVM), making it possible to build images outside the Nix Store by simply executing the buildScriptBin package. Make this toolset extensible. Add argument supportImageRunning for buildImageInLinuxVM. Add runImageInLinuxVM.
10 tasks
38e5850
to
96bda30
Compare
This was referenced Aug 5, 2024
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2.status: merge conflict
This PR has merge conflicts with the target branch
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild on Darwin
10.rebuild-linux: 0
This PR does not cause any packages to rebuild on Linux
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.
Description of changes
Replace(done in trivial-builders: replace writeReferencesToFile with writeClosure #178717)mkLayer
withpkgs.writeClosure
. This prevents unnecessary copy of the closures just to get the reference list.storeDir
from the override interface..singularity.d
in sandbox for bothapptainer
andsingularity
buildImage
into multiple reusable build helpers.passthru.buildscriptPackage
to each of the image derivation, which can be executed to build the image outside of Nix Store. This saves the space and CPU time needed to spawn a VM, allocate a virtual disk file, and copy the result image out from the store.preImageBuild
andpostImageBuild
hooks to provide a uniform overriding interface.buildImageInLinuxVM
. Add argumentsupportImageRuning
to opt in image running support during build.runImageInLinuxVM
which wraps aroundbuildImageInLinuxVM
.apptainer.passthru.tests.exec-image-in-linux-vm
to automate the binary functionality tests. If applied, we can test the image building and running functionality of Apptainer simply by running the Nix CI, and version bumping PRs made by r-ryantm can be merged directly when all the tests is passed.It's currently impossible for
singularity
(Sylabs SingularityCE) to run images in Nix sandbox, since it (still) requires a loop device to mount the image, which is not available in the Nix sandbox.Depends on #178717.
Initial effort for #224636.
Cc: @jbedo @SomeoneSerge @GaetanLepage
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)