cryosparcw reference (v5.0+)
How to use the cryosparcw utility for managing CryoSPARC workers
Worker management with cryosparcw
cryosparcwCryoSPARC worker nodes host CryoSPARC’s compute programs and libraries used to run jobs.
Workstations or worker nodes with a cryosparc_worker installation have access to cryosparcw, a built-in command-line utility to perform advanced usage tasks.
Run all commands in this section while logged into the workstation or worker nodes where the cryosparc_worker package is installed.
Navigate to the worker installation directory and run command starting with bin/cryosparcw. For example:
cd /path/to/cryosparc_worker
bin/cryosparcw info --gpuYou may add cryosparcw to the worker's PATH by adding a line like this to the ~/.bashrc file, replacing /path/to/cryosparc_worker with the actual path to the worker installation directory:
export PATH=/path/to/cryosparc_worker/bin:$PATHAnd restart your shell. Run the following command to verify that PATH was updated correctly:
which cryosparcwAnd ensure the output is /path/to/cryosparc_worker/bin/cryosparcw .
For help with a specific command, run:
cryosparcw COMMAND --helpFor example, for help showing worker info, run:
cryosparcw info --helpcryosparcw
cryosparcwUsage:
Options:
--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.
All available cryosparcw commands are listed and documented below.
cryosparcw version
cryosparcw versionShow CryoSPARC version.
Usage:
Options:
--help: Show this message and exit.
cryosparcw update
cryosparcw updateInstall a previously-downloaded CryoSPARC update at cryosparc_worker/cryosparc_worker.tar.gz
Usage:
Options:
--force--help: Show this message and exit.
cryosparcw deps
cryosparcw depsInstall Python and external dependencies. Specify --force to install even if they haven't changed.
Usage:
Options:
--force--help: Show this message and exit.
cryosparcw patch
cryosparcw patchInstall a patch that was previously-downloaded on the master with cryosparcm patch --download.
Usage:
Options:
-f, --file FILE: Path to input file [default: cryosparc_worker/cryosparc_worker_patch.tar.gz]--force--help: Show this message and exit.
cryosparcw env
cryosparcw envExport environment variables used by CryoSPARC. Execute the output to activate, e.g., eval $(cryosparcw env)
Usage:
Options:
--help: Show this message and exit.
cryosparcw connect
cryosparcw connectConnect a managed worker to CryoSPARC. Run this command on the worker that you wish to register with CryoSPARC, or whose existing registration you wish to update.
For full details, see Connecting A Worker Node.
Usage:
Options:
--license TEXT: CryoSPARC license ID read from installed configuration file (config.sh) if not specified. [env var: CRYOSPARC_LICENSE_ID; required]--master TEXT: Hostname of machine running cryosparc_master. Specify "localhost" for current host. [env var: CRYOSPARC_MASTER_HOSTNAME; required]--port INTEGER: Base port for CryoSPARC services. Usually 61000 unless changed during installation. [env var: CRYOSPARC_BASE_PORT; default: 61000]--auth / --no-auth: Enable master database authentication [env var: CRYOSPARC_DB_ENABLE_AUTH; default: auth]--timeout INTEGER: Database connection timeout, in milliseconds [env var: CRYOSPARC_DB_CONNECTION_TIMEOUT_MS; default: 20000]--worker TEXT: Name of worker. Defaults to $(hostname) if not specified.--lane TEXT: Scheduler lane for worker (create if does not exist). [default: default]--sshstr TEXT: SSH login string to access worker, required if the worker's hostname or UNIX user differs when connecting from master, or to specify additional SSH flags. Defaults to "$(whoami)@worker".--cpus INTEGER RANGE: Number of CPU cores to enable for jobs. Enable all cores if not specified. [x>=1]--rams INTEGER RANGE: Number of 8GiB RAM slots to enable for jobs. Enable all RAM if not specified. [x>=1]--gpus TEXT: Comma-separated list of GPU device IDs, e.g., '0,1,2'. Selects all GPUs if not specified. Cannot be specified with --no-gpu.--gpu / --no-gpu: Do not attempt to select any GPUs. Don't specify both --no-gpu and --gpus flag. [default: gpu]--ssdpath DIRECTORY: Local SSD scratch path. Strongly recommended.--ssdquota INTEGER: Maximum amount of SSD space to use for caching, in megabytes (MB).--ssdreserve INTEGER: Minimum amount free space to leave on the SSD, in megabytes (MB). [default: 10000]--help: Show this message and exit.
Example command to connect a worker to a new lane with the same name.
cryosparcw disconnect
cryosparcw disconnectDisconnect a worker node. You may also use cryosparcm worker disconnect if the worker installation directory is no longer accessible.
Usage:
Options:
--license TEXT: CryoSPARC license ID, read from installed configuration file (config.sh) if not specified. [env var: CRYOSPARC_LICENSE_ID; required]--master TEXT: Hostname of machine running cryosparc_master. Specify "localhost" for current host. [env var: CRYOSPARC_MASTER_HOSTNAME; required]--port INTEGER: Base port for CryoSPARC services. Usually 61000 unless changed during installation. [env var: CRYOSPARC_BASE_PORT; default: 61000]--auth / --no-auth: Enable master database authentication [env var: CRYOSPARC_DB_ENABLE_AUTH; default: auth]--timeout INTEGER: Database connection timeout, in milliseconds [env var: CRYOSPARC_DB_CONNECTION_TIMEOUT_MS; default: 20000]--worker TEXT: Name of worker. Defaults to $(hostname) if not specified.--help: Show this message and exit.
cryosparcw info
cryosparcw infoShow system information.
Usage:
Options:
--gpu / --no-gpu: Include GPU info [default: no-gpu]--format [text|json]: Output format [default: text]--help: Show this message and exit.
cryosparcw gpulist
cryosparcw gpulistShow information about available GPUs on this host.
Usage:
Options:
--format [text|json]: Output format [default: text]--help: Show this message and exit.
Use to verify that the worker is installed correctly.
cryosparcw call
cryosparcw callRun any command with the CryoSPARC worker environment.
Usage:
Options:
--help: Show this message and exit.
cryosparcw python
cryosparcw pythonRun python command with the CryoSPARC worker environment.
Usage:
Options:
--help: Show this message and exit.
cryosparcw ipython
cryosparcw ipythonRun interactive python shell with the CryoSPARC worker environment.
Usage:
Options:
--help: Show this message and exit.
Last updated