You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/storage.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ At first it can seem strange that a "high-performance" file system is significan
14
14
15
15
Meta data lookups on Lustre are expensive compared to your laptop, where the local file system is able to aggressively cache meta data.
16
16
17
+
[](){#ref-guides-storage-venv}
17
18
### Python virtual environments with uenv
18
19
19
20
Python virtual environments can be very slow on Lustre, for example a simple `import numpy` command run on Lustre might take seconds, compared to milliseconds on your laptop.
1. The `default` view is recommended, as it loads all the packages provided by the uenv.
309
+
This is important for PyTorch to work correctly, as it relies on the CUDA and NCCL libraries provided by the uenv.
310
+
2. The virtual environment is created in the current working directory, and can be activated and deactivated like any other Python virtual environment.
311
+
3. Activating the virtual environment will override the Python executable provided by the uenv, and use the one from the virtual environment instead.
312
+
This is important to ensure that the packages installed in the virtual environment are used.
313
+
4. The virtual environment can be used to install any Python package.
314
+
5. The virtual environment can be deactivated using the `deactivate` command.
315
+
This will restore the original Python executable provided by the uenv.
316
+
6. The uenv can be exited using the `exit` command or by typing `ctrl-d`.
317
+
318
+
!!! note
319
+
Python virtual environments can be slow on the parallel Lustre file system
320
+
due to the amount of small files and potentially many processes accessing
321
+
it. If this becomes a bottleneck, consider [squashing the
322
+
venv][ref-guides-storage-venv] into its own memory-mapped, read-only file
323
+
system.
324
+
313
325
Alternatively one can use the uenv as [upstream Spack
314
326
instance][ref-building-uenv-spack] to to add both Python and non-Python
315
327
packages. However, this workflow is more involved and intended for advanced
0 commit comments