Environment variables
(Advanced) Specify additional environment variables in the configuration files to augment cryoSPARC's low-level behaviour.
To set or change one of these environment settings, add a new line to one the config.sh files with the following format (substitute VARIABLE and VALUE as indicated in the next sections):
1
export VARIABLE="VALUE"
Copied!
Or set the value based on a different environment variable provided by the system:
1
export VARIABLE="${OVER_VARIABLE}"
Copied!
Which config.sh file you use depends on which variable you need to change. The variables available for each file are described below.

cryosparc_master/config.sh

Note: Restart cryoSPARC with cryosparcm restart after changing this file
Variable
Description
Default Value
CRYOSPARC_CLIENT_TIMEOUT
How many seconds to wait for network requests between cryoSPARC master/master processes before timing out with an error
300
CRYOSPARC_DISABLE_IMPORT_ON_MASTER
In master/worker or cluster modes, Import Jobs always run on the default master node. Set this to true to allow running them on any node
false
CRYOSPARC_FORCE_HOSTNAME
In master/worker or cluster modes, cryosparcm commands always run on the machine where cryosparc_master was initially installed. Set this to true to allow running on any machine
false
CRYOSPARC_FORCE_USER
cryosparcm commands must be run by the same UNIX user account that owns the cryosparc_master installation. Set this to true to allow running cryosparcm from any user account
false
CRYOSPARC_HOSTNAME_CHECK
Override the installed master hostname when checking that cryosparcm is running on the correct host. See also CRYOSPARC_FORCE_HOSTNAME
-
CRYOSPARC_IGNORE_HIDDEN_FILES
When checking that job directory is empty before running a job, set to true to ignore any filenames that being with .. Use this if your file system or OS automatically creates hidden files
false
CRYOSPARC_LIVE_DATA_MANAGEMENT_SCRIPT_ENABLE
Set to true to run the script specified in CRYOSPARC_LIVE_DATA_MANAGEMENT_SCRIPT_PATH every time a Live session's data management status changes. See Live Session Data Management Tutorial
false
CRYOSPARC_LIVE_DATA_MANAGEMENT_SCRIPT_PATH
The path to a bash script that runs every time a session's data management status changes: See Live Session Data Management Tutorial. Use this to perform archive or deletion processes specific to your system (e.g., move archive data to an S3 bucket). The script is given arguments for the project UID, session UID, the datatype that changed (micrographs, raw, particles, metadata, or thumbnails), and the status of that datatype (active, archiving, archived, deleted, deleting or missing)
-
CRYOSPARC_MONGO_CACHE_GB
How much RAM to allocate for MongoDB database query cache, in GB
4
CRYOSPARC_SLACK_WEBHOOK_URL
If set, cryoSPARC makes an HTTP request to this URL each time a job's status changes with some job metadata encoded in JSON
-
CRYOSPARC_SSD_CACHE_LIFETIME_DAYS
Whenever a job requires SSD cache, it automatically checks for and removes files that haven't been accessed in more than the number of days specified by this variable. Note: Files may remain on the SSD for longer than this amount since they only get cleaned up when a job runs
30
REQUESTS_CA_BUNDLE
May be required for connection to the cryoSPARC license verification server on systems with outdated Certificate-Authority files or that filter HTTPS requests through a proxy. Specify a path to a file or folder that contains the certificates
-
Note: This file includes the following environment variables that are specified at installation time:
  • CRYOSPARC_LICENSE_ID
  • CRYOSPARC_MASTER_HOSTNAME
  • CRYOSPARC_DB_PATH
  • CRYOSPARC_BASE_PORT

cryosparc_worker/config.sh

No restart is required after changing this file
Variable
Description
Default Value
CRYOSPARC_CLIENT_TIMEOUT
How many seconds to wait for network requests between cryoSPARC worker/master processes before timing out with an error
300
CRYOSPARC_NO_PAGELOCK
By default, cryoSPARC uses the CUDA driver's pagelocked_empty function to allocate GPU memory. This causes CUDA-driver errors on some systems. Set this variable to true to use numpy.empty
false
CRYOSPARC_SSD_PATH
Set this variable to override the SSD cache path provided when you installed the worker. Useful if the SSD cache path is generated by your cluster as an environment variable when the job is scheduled
-
CRYOSPARC_TIFF_IO_SHM
When reading TIFF movie files, cryoSPARC reads the entire file into memory before decompressing. This significantly improves performance on some networked file systems but uses more memory. Set to false to perform decompression directly from disk
true
Note: This file includes the following environment variables that are specified at installation time:
  • CRYOSPARC_LICENSE_ID
  • CRYOSPARC_CUDA_PATH
  • CRYOSPARC_USE_GPU
Last modified 6d ago