We removed systemd-related information as we identified a case where the posted instructions did not result in the expected CryoSPARC startup atsystem boot. The test case involved an autofs-mounted cryosparc_master/
directory and a symbolic link, to maintain consistency between the original installation path and the current path to cryosparc_master/
. We have not confirmed whether these details contributed to the test failure.
(Outdated and unsupported legacy instructions) CryoSPARC and systemd
Note: Versions CryoSPARC prior to v4.0.2 required a cryosparc-env
service. This is no longer required and may be replaced with the single provided cryosparc-supervisor
service.
The instructions and script below assume that a systemd unit will be installed for a single CryoSPARC instance. On hosts with multiple CryoSPARC instances, each instance’s unit file would have to be given a unique name.
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 commands to
- ensure your shell’s environment variables are setup correctly for CryoSPARC
- change into the correct working directory
- confirm that the working directory is owned by the designated user and group under which CryoSPARC runs
- install the systemd unit file
- update systemd
eval $(cryosparcm env)
cd ${CRYOSPARC_ROOT_DIR}/systemd/
stat --format '%U %G' .
sudo env "CRYOSPARC_ROOT_DIR=$CRYOSPARC_ROOT_DIR" ./install_services.sh
sudo systemctl daemon-reload
You should have the following new service installed:
cryosparc-supervisor.service
To start CryoSPARC via systemd, run the service.
sudo systemctl start cryosparc-supervisor.service
If you want to configure CryoSPARC to run on startup, enable the service:
sudo systemctl enable cryosparc-supervisor.service
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:
https://discuss.cryosparc.com/t/cryosparc-3-0-systemd-setup-on-rhel8/5709