CryoSPARC Guide
Search
⌃K

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):
export VARIABLE="VALUE"
Or set the value based on a different environment variable provided by the system:
export VARIABLE="${OVER_VARIABLE}"
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_CLUSTER_JOB_MONITOR_INTERVAL
The amount of time to wait (in seconds) in between status updates for cluster jobs.
10
CRYOSPARC_CLUSTER_JOB_MONITOR_MAX_RETRIES
The maximum amount of retries for cluster job status updates.
1000000
CRYOSPARC_DB_CONNECTION_TIMEOUT_MS
The amount of time to wait (in milliseconds) for the database to respond when starting it.
20000
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_LICENSE_SERVER_ADDR
Override CryoSPARC license server address. Use for systems that require access through a proxy.
https://get.cryosparc.com
CRYOSPARC_LIVE_DATA_MANAGEMENT_SCRIPT_ENABLE
Set to true to run the script specified in CRYOSPARC_LIVE_DATA_MANAGEMENT_SCRIPT_PATH every time a CryoSPARC 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_MOTION_CORRECTION_CPUS_PER_GPU
How many CPU cores to allocate for each GPU used in Patch, Full-frame and Local Motion Correction jobs
6
CRYOSPARC_MOTION_CORRECTION_RAM_MB_PER_GPU
How much RAM (in MB) to allocate for each GPU used in Patch, Full-frame and Local Motion Correction jobs
15000
CRYOSPARC_PROJECT_DIR_PREFIX
The prefix to add to a project directory name on the filesystem when it is created.
CS-
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
CRYOSPARC_DISABLE_EXTERNAL_REQUESTS
Set to true to prevent the application from requesting external HTTPS resources used to display information modules on the homepage.
-
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 or EER 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