Skip to content

Conversation

@egparedes
Copy link
Contributor

No description provided.

@github-actions
Copy link

preview available: https://docs.tds.cscs.ch/47

@egparedes egparedes marked this pull request as draft March 17, 2025 11:50
@egparedes egparedes marked this pull request as ready for review March 17, 2025 11:57
@egparedes egparedes force-pushed the relocatable-venvs-with-uv branch from 096ce8a to eb89002 Compare March 17, 2025 11:58
@github-actions
Copy link

preview available: https://docs.tds.cscs.ch/47

1 similar comment
@github-actions
Copy link

preview available: https://docs.tds.cscs.ch/47

@egparedes
Copy link
Contributor Author

I'm sorry for requesting a review before it was ready (I forgot to commit some changes). Now it should be ready.

@RMeli
Copy link
Member

RMeli commented Mar 17, 2025

I'm sorry for requesting a review before it was ready

No worries! Review requests have been added automatically because we added ourselves to the CODEOWNERS files in #45.

@github-actions
Copy link

preview available: https://docs.tds.cscs.ch/47


In our "simple" pytorch example, I counted **22806 inodes**!

##### Alternative virtual environment creation using uv
Copy link
Member

Choose a reason for hiding this comment

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

Instead of adding the uv method as a sub-heading under the pip method, how about putting them at the same level as tabs?

With one tab for pip, and one for uv (I would be fine with making the "first" default tab the uv one, so that we can push users towards uv.

https://squidfunk.github.io/mkdocs-material/reference/content-tabs/#usage

Copy link
Member

Choose a reason for hiding this comment

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

See here for an example of what tabs look like in our docs
https://eth-cscs.github.io/cscs-docs/software/tools/linaro/#quickstart-guide

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@egparedes egparedes force-pushed the relocatable-venvs-with-uv branch from c6268b5 to 3526b02 Compare March 17, 2025 16:05
@github-actions
Copy link

preview available: https://docs.tds.cscs.ch/47

@github-actions
Copy link

preview available: https://docs.tds.cscs.ch/47

@msimberg msimberg changed the title Update storage section to explain relocatable pytohn venvs with uv Update storage section to explain relocatable python venvs with uv Mar 17, 2025
```

A benefit of this approach is that the squashfs file can be copied to a location that is not subject to the Scratch cleaning policy.
Remember that virtual environments created by `uv` are relocatable only if the `--relocatable` option flag is passed to the `uv venv` command as mentioned in step 1. In that case, the generated environment is relocatable and thus it is possible to mount it in multiple locations without problems.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Remember that virtual environments created by `uv` are relocatable only if the `--relocatable` option flag is passed to the `uv venv` command as mentioned in step 1. In that case, the generated environment is relocatable and thus it is possible to mount it in multiple locations without problems.
Remember that virtual environments created by `uv` are relocatable only if the `--relocatable` flag is passed to the `uv venv` command as mentioned in step 1. In that case, the generated environment is relocatable and thus it is possible to mount it in multiple locations without problems.


Note that the original virtual environment is still installed in `$SCRATCH/sqfs-demo/.venv`, however the squashfs image has been mounted on top of it, so the single squashfs file is being accessed instead of the many files in the original version.

A benefit of this approach is that the squashfs file can be copied to a location that is not subject to the Scratch cleaning policy.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
A benefit of this approach is that the squashfs file can be copied to a location that is not subject to the Scratch cleaning policy.
A benefit of this approach is that the squashfs file can be copied to a location that is not subject to the scratch cleaning policy.

or

Suggested change
A benefit of this approach is that the squashfs file can be copied to a location that is not subject to the Scratch cleaning policy.
A benefit of this approach is that the squashfs file can be copied to a location that is not subject to the `$SCRATCH` cleaning policy.

Copy link
Member

@bcumming bcumming left a comment

Choose a reason for hiding this comment

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

Fantastic, thanks!

@bcumming bcumming merged commit 85da491 into eth-cscs:main Mar 18, 2025
1 check passed
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