What is CryoSPARC?
CryoSPARC is a state of the art scientific software platform for cryo-electron microscopy (cryo-EM) used in research and drug discovery pipelines.
📘 Local cryosparc_user account on HPC
CryoSPARC requires a local user account named cryosparc_user that is used to control needed CryoSPARC resources and job allocations.
When looking to run CryoSPARC jobs, a user would need to connect/login into HPC as the cryosparc_user account.
Contact HPC to be granted access to the cryosparc_user acount
📘 Submitting a CryoSPARC job
Submit an interactive SLURM job:
srun --partition=general-gpu -N 1 -n 62 --gres=gpu:1 --time=12:00:00 --pty bash
Once a node is assigned to the interactive SLURM srun job, start the Cryosparc Master process with the following command:
cryosparcm start
CryoSPARC should run the master process on the current GPU node that was assigned to the SLURM job.
Once the master process is running, the assigned GPU node would need to be enabled as a CryoSPARC worker node.
The following commands will provide the steps to tell CryoSPARC to use the currently assigned GPU node as a worker node and allocate the GPU node to the CryoSPARC default job submission lane:
cd /home/cryosparc_user/cryosparc/cryosparc2_worker/bin
./cryosparcw connect --worker $(hostname) --master $(hostname) --port 39000 --nossd --lane default --newlane
📘 Launching CryoSPARC login GUI from assigned GPU node
Once a GPU node has been assigned as a CryoSPARC worker node, the connection to the CryoSPARC GUI can be established.
At this time, the https domain name for the GPU node will not work.
Connection can be established using the IP address of the GPU node in a web browser.
Open a local web browser to point to the http link for the assigned GPU node.
The CryoSPARC instance spawns on port 39000.
The link will look like the following:
To view the IP address of the assigned GPU node the following command can be used:
ip a
The IP address of the assigned GPU node will begin with 137.99.x.x
The login screen for CryoSPARC should show up looking like the following:
Login into the CryoSPARC web GUI using your CryoSPARC account email address and password.
Once logged in, the CryoSPARC web GUI should load looking like the following:
This this web GUI, the process of launching and submitting CryoSPARC job(s) should be the same.
Launch the CryoSPARC job to the gpu node that was assigned to the interactive SLURM srun job in the previous step.
If there is a network interruption, the CryoSparc Master process on the gpu node will crash. There is a /tmp/ cryosparc .sock file that would need to be removed to refresh and allow cryosparc to continue running on a node that had the brief interruption.
📘 Cleaning up CryoSPARC environment after job finishes
Once the running CryoSPARC job finishes, the following steps are recommended to exit CryoSPARC cleanly and free up the assigned GPU node to allow other users to submit jobs to the GPU node:
Log off of the CryoSPARC GUI and close the browser tab.
Go back to the terminal that is logged into HPC with the running interactive srun job and stop the master CryoSPARC process using the following command: cryosparcm stop
Exit out of the interactive SLURM job to free up the assigned GPU node.