The documentation here states the following:
As cryoSPARC only wraps installed Topaz instances rather than providing Topaz instances directly, Topaz must be first installed in the Python environment within cryoSPARC.
It is not recommended to use the Anaconda Python environment that is installed with cryoSPARC. This environment is subject to be destroyed upon an update to cryoSPARC. It is best to use your own Anaconda Python (2.7) environment, or a new one if one doesn’t already exist. Please ensure the Topaz executable is accessible by the cryoSPARC user account, and accessible on each worker node.
So the back to back combination of “Topaz must be first installed in the Python environment within cryoSPARC.” and “It is not recommended to use the Anaconda Python environment that is installed with cryoSPARC.” is somewhat confusing.
I interpreted this to mean to use the anaconda installation found here:
~cryosparc_user/cryosparc2_worker/deps/anaconda
and create a separate topaz anaconda environment within this base on the worker nodes, since I’m guessing that’s where the code will run. (We have 2 workstations serving as cryosparc workers and a server running the master software.)
So In this anaconda, I proceeded to activate base, and create a new topaz environment:
(One oddity which I don’t understand: I had to try and run ~deps/anaconda/bin/conda before conda.sh could be sourced effectively. Not sure what that’s all about, as I’m reasonably familiar with anaconda.)
$ . /local/home/cryosparc_user/cryosparc2_worker/deps/anaconda/etc/profile.d/conda.sh
$ source activate
$ conda create --name topaz python=2.7
$ conda activate topaz
$ conda install topaz -c tbepler -c pytorch
The tutorial then suggests finding the location of the topaz executable, which I did:
~cryosparc_user/cryosparc2_worker/deps/anaconda/envs/topaz/bin/topaz
which I then sent to the cryosparc administrator. He tried inserting this executable path in the configuration, but cryosparc complained that it didn’t exist, suggesting that topaz also needed to be installed on cryosparc2_master as well, which I did. Hence, problem: the absolute path to the topaz executable on the master is necessarily different than it is on the worker nodes, so when he attempts to use topaz, the executable can’t be found:
File "cryosparc2_compute/jobs/topaz/topaz_utils.py", line 75, in get_topaz_version
raise OSError('Input Topaz executable path does not exist.')
OSError: Input Topaz executable path does not exist.
One troubling thing in all of this is that it appears you’re running the topaz executable without activating the topaz environment. As far as I know, that’s not how anaconda is intended to be used, and if this works, it’s only working accidentally, since topaz isn’t being run in the environment that was created for it but rather in the cryosparc environment.
Anyway, if anyone has any insights into what I need to do to get this to work, please share.
Thanks!