(Optional) cryoSPARC and systemd

Installing cryoSPARC as a systemd service (requires root access)

To install the optional cryoSPARC systemd service, navigate to the folder cryosparc_master/systemd inside your cryoSPARC installation directory on the master node.
Run the following command, to ensure your shell's environment variables are setup correctly for cryoSPARC:
1
eval $(cryosparcm env)
Copied!
Then, double check that the owner and group of the file install_services.sh matches the user and group that cryoSPARC runs as. Finally, execute the aforementioned script, as root and with the appropriate environment variables, as follows:
1
sudo env "CRYOSPARC_ROOT_DIR=$CRYOSPARC_ROOT_DIR" ./install_services.sh
Copied!
You should have two new services installed:
    1.
    cryosparc-env.service
    2.
    cryosparc-supervisor.service
The former service (cryosparc-env) does some environment setup required by cryoSPARC, and the latter is the actual cryoSPARC service. To start cryoSPARC via systemd, run both services, in order.
1
sudo systemctl start cryosparc-env.service
2
sudo systemctl start cryosparc-supervisor.service
Copied!
Only the latter service needs to be stopped to shut down cryoSPARC.
If you want to configure cryoSPARC to run on startup, both services need to be enabled:
1
sudo systemctl enable cryosparc-env.service
2
sudo systemctl enable cryosparc-supervisor.service
Copied!

Notes

It is not recommended to use systemctl and cryosparcm stop/start at the same time to manage cryoSPARC, it is best to choose one or the other. When using systemd, other features of cryosparcm (other than start/stop) can be used as normal.
If you are running SELinux, it may prevent these services from functioning by default. Contact your system administrator for assistance configuring SELinux to allow the services to operate.

Troubleshooting

Users of Red Hat Enterprise Linux have reported difficulties getting the cryosparc systemd configuration working, likely due to SELinux. See the following discussion forum post for a workaround, until this is addressed:
Last modified 6mo ago