Creating cryosparcm cli functionalities to non admin users

Dear developers of cryosparc,

We are currently using cryosparc installed on a cluster with a bunch of gpu nodes, I’m currently serving as the administrator of this cluster. Thanks to the awesome functions related to cryosparcm cli, I can perform job submission via command line, which is very handy for submitting a large number of related jobs, especially when splitting the data set into multiple splits to speed up the calculation.

However, the current cryosparcm cli command requires read and execution permission for a particular user. It would be much better in terms of cluster management if we could let non-admin users can get access to the cryosparcm cli functions (such as make_job or enqueue_job) without touching the cryosparcm command (which directly controls a lot of things such as server manipulation and database management). I wonder if this could be implemented in future releases :slight_smile:

Many thanks in advance!

1 Like

Thank you for the suggestion @hgxy15.

@hgxy15 this is now possible with a Python script running cryosparc-tools. Specifically, you may do the following:

  1. Initialize an instance of the CryoSPARC class
  2. Use CryoSPARC.create_job or CryoSPARC.find_job to get a target job
  3. Use job methods such as Job.connect and Job.queue to orchestrate custom workflows

Example script:

import sys
from import CryoSPARC

cs = CryoSPARC(email="", password="password123", host="localhost", base_port=39000)
job = cs.find_job(sys.argv[1], sys.argv[2])


python PX JY lane

Hope that helps, let me know if you have any questions.

1 Like

Thanks for the update ! The new cryosparc-tools is working superbly on our cluster. Thanks for the Great job !