poncho_package_run(1)
β¨ poncho_package_run β¨
okay so bestie, welcome to poncho_package_run β it's a Cooperative Computing Tools girlie and she's here to run your Python stuff inside a whole isolated Conda environment π
(the manual page calls her poncho_package_run(1) if you're being formal, which, slay).
πΈ NAME πΈ
poncho_package_run β a wrapper script that executes a Python script inside an isolated Conda environment π«Ά
π SYNOPSIS π
poncho_package_run [options] --environment <file> <command and args ...>
π¦ DESCRIPTION π¦
So here's the vibe: poncho_package_run is a wrapper script for a Python task, and it runs that task inside the Conda environment you point it at. That's literally the whole plot π. You can use it on different machines inside the Work Queue system to unpack and activate a Conda environment, and then run a task inside that isolated environment. main character energy fr fr.
The --environment <file> argument is the name of the Conda environment as a tarball file in which to run the Python task. And yes, bestie, the --environment <file> argument is the name of the Conda environment as a tarball file in which to run the Python task. I said it twice because the manual says it twice and I do not make the rules, I just vibe with them π.
command and args (aka the COMMAND) get interpreted as ARGV for a command to be run inside the Conda environment. Periodt.
By default, the conda environment is unpacked into a temporary directory which is removed at the end of execution π§. But if you pass --unpack-to <dir>, then the environment gets unpacked to <dir>, and it is not removed at the end of execution. Even better: further (even simultaneous π) executions of python_package_run will not unpack the environment if <dir> is already populated. Instances of python_package_run coordinate via a writing lock π. By default, the wait for a writing lock is 300 seconds, but you can change that with the --wait-for-lock <secs> option.
If the argument to --unpack-to doesn't exist, then it gets created as an empty directory. If it is an existing directory but it is not empty, then unpacking is not performed β regardless of whether that directory contains a valid conda environment π. So like, heads up.
β¨ OPTIONS β¨
-e,--environment=<file>β Conda environment as a tar file. (Required. so don't forget it bestie π¨)-u,--unpack-to=<dir>β Directory to unpack the environment. If not given, a temporary directory is used.-w,--wait-for-lock=<secs>β Number of seconds to wait to get a writing lock on<dir>. Default is 300.-d,--debugβ Print debug messages. π--help-env-creationβ Show instructions to create conda environments as tar files. (iykyk)-h,--helpβ Show the help screen.
π EXIT STATUS π
On success, returns 0 β¨. On failure, returns non-zero π.
π EXAMPLE π
poncho_package_run --environment example_venv.tar.gz python3 example.py
This will run the command python3 example.py within the Conda environment in example_venv.tar.gz. Note that this command can be performed either locally, on the same machine that analyzed the script and created the environment, or remotely, on a different machine that contains the Conda environment tarball and the example.py script. Obsessed with the flexibility tbh.
poncho_package_run --unpack-to my_persistent_env --environment example_venv.tar.gz python3 example.py
The previous command will run faster the second time it is executed, because the environment is only unpacked once to my_persistent_env π₯. Ate and left no crumbs.
π COPYRIGHT π
The Cooperative Computing Tools are Copyright (C) 2022 The University of Notre Dame. This software is distributed under the GNU General Public License. See the file COPYING for details.
k bye bestie, go run your little isolated environments π this was CCTools 7.15.9 FINAL energy and you're gonna slay with it. mwah π«Άβ¨
π¦ where this page comes from
- ubuntu resolute: coop-computing-tools 1:7.15.9-1build1 Β· GPL-2.0-only
- ubuntu stonking: coop-computing-tools 1:7.15.9-2build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms