📦 Tar Env⚓︎
Check for (and create if missing) a tarball of the current Python environment for distribution to compute nodes.
This is the first step in the two-step environment distribution workflow: ensure
a tarball exists with ezpz tar-env, then broadcast it to all worker nodes with
ezpz yeet-env.
What it does⚓︎
- Detects the active Python environment (conda or virtual environment) from
sys.executable - Checks whether a
.tar.gzarchive already exists for that environment - If no tarball is found, creates one alongside the environment directory
- Logs the path to the tarball
This is particularly useful on HPC systems where shared filesystems can become bottlenecks when many nodes simultaneously read Python packages. By packing the environment into a single tarball and extracting it on each node's local storage, import times are dramatically reduced.
Example⚓︎
Programmatic usage
The underlying check_for_tarball() function can be called directly from
Python with additional options:
See Also⚓︎
ezpz yeet-env— broadcast the tarball to all worker nodesezpz.utils.tar_env— Python API reference