Skip to content
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

Version 0.8.0: add sqlite / mount uenv repo images #43

Merged
merged 47 commits into from
May 24, 2024

Conversation

simonpintarelli
Copy link
Member

@simonpintarelli simonpintarelli commented Apr 28, 2024

Support to mount images from the uenv repository.

srun --uenv=<arg> [cmd]

If <arg> is not an absolute path, the plugin attempts to mount images listed in $UNEV_REPO_PATH/index.db or $SCRATCH/.uenv-images/index.db.

  1. Check if <arg> is an id or sha256.
  2. Otherwise run a query for name, name/version, or name:tag or name/version:tag.

--uenv-arch can be used to add a constraint on uarch:
srun --uenv-arch=gh200 --uenv=<id>/<sha256> [cmd]

--uenv-uarch is ignored if the image is mounted by id/sha256.

The following regex is used to match an image specifier (with optional mountpoint):

const std::regex repo_pattern("(" JFROG_IMAGE ")"
                              "(/[a-zA-Z0-9._-]+)?"
                              "(:[a-zA-Z0-9._-]+)?"
                              "(:" LINUX_ABS_FPATH ")?",
                              std::regex::ECMAScript);

Bats unit tests

For the unit tests, the following index.db is used.

system uarch name version tag sha256 id
santis x86_64 icon-wcp v1 latest 3e8f96370a4685a7413d344d98f69889c0ba6bb1d6c2d3d19ce01b6079c58c68 3e8f96370a4685a7
santis x86_64 icon-wcp v1 v3 3e8f96370a4685a7413d344d98f69889c0ba6bb1d6c2d3d19ce01b6079c58c68 3e8f96370a4685a7
santis x86_64 prgenv-gnu 24.2 latest 1736b4bb5ad9b3c5cae8878c71782a8bf2f2f739dbce8e039b629de418cb4dab 1736b4bb5ad9b3c5
santis x86_64 prgenv-gnu 24.2 v2 1736b4bb5ad9b3c5cae8878c71782a8bf2f2f739dbce8e039b629de418cb4dab 1736b4bb5ad9b3c5
santis x86_64 prgenv-gnu 24.3 v3 4e8f96370a4685a7413d344d98f69889c0ba6bb1d6c2d3d19ce01b6079c58c68 4e8f96370a4685a7
  • Test 1: mount prgenv-gnu/24.2, prgenv-gnu:latest, prgenv-gnu/24.2:latest
  • Test 2: mount prgenv-gnu by id
  • Test 3: mount prgenv-gnu by sha256
  • Test4: mount prgeng-gnu -> expect duplicate error.

@simonpintarelli simonpintarelli changed the title Feat sqlite Add sqlite / mount uenv repo images Apr 28, 2024
@simonpintarelli simonpintarelli marked this pull request as ready for review April 30, 2024 08:38
@simonpintarelli simonpintarelli changed the title Add sqlite / mount uenv repo images Version 1.0.0: add sqlite / mount uenv repo images Apr 30, 2024
@simonpintarelli simonpintarelli merged commit ba02f16 into master May 24, 2024
6 checks passed
@simonpintarelli simonpintarelli changed the title Version 1.0.0: add sqlite / mount uenv repo images Version 0.8.0: add sqlite / mount uenv repo images May 24, 2024
simonpintarelli added a commit that referenced this pull request May 24, 2024
@bcumming bcumming deleted the feat-sqlite branch May 24, 2024 15:23
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.

2 participants