Setting up cryo-EM conda instance
- Log in to S3DF and then remote into an interactive pool node:
ssh iana
- Start an interactive session on a GPU batch node:
- Note that the topaz install is only tested on a turing host, so be sure to use that one.
srun --partition turing --account cryoem:<proposal_number> -n 1 --time=01:00:00 --pty /bin/bash
- Permanently add cryo-EM’s conda instance to your PATH environment variable
echo "export PATH=/sdf/group/cryoem/sw/conda/bin:${PATH}" >> ~/.bashrc
- Create a personal .condarc file at the top of your home directory and set the envs_dirs and pkg_dirs fields to make them point at somewhere in your /sdf/group/cryoem/g/<proposal_number>/... directory
$ cat ~/.condarc channels: - defaults - anaconda - conda-forge - pytorch envs_dirs: - /sdf/group/cryoem/g/<proposal_number>/conda/envs pkgs_dirs: - /sdf/group/cryoem/g/<proposal_number>/conda/pkgs auto_activate_base: false
Topaz Install
- Create the conda environment for topaz
conda create -n topaz python=3.6 source activate topaz
- Install precompiled topaz package and its dependencies, including pytorch (note that as of Dec 2024, cryoSPARC is only compatible with topaz v0.2.5, so we must force the install to this version):
conda install topaz=0.2.5 mkl=2024.0.0 -c tbepler -c pytorch -c conda-forge
- To test your install, run:
topaz --version
- Deactivate your conda environment and leave the interactive batch node
conda deactivate exit
Connecting Topaz to CryoSPARC
- When you run cryosparc, for the path to topaz executable, try the following path:
/sdf/group/cryoem/g/<proposal_number>/conda/envs/topaz/bin/topaz
ALTERNATIVELY
- Create a wrapper script in your home directory to connect topaz to cryosparc by using the command: nano ~/topaz.sh
- Copy+paste the following into your file:
#!/usr/bin/env bash if command -v conda > /dev/null 2>&1; then conda deactivate > /dev/null 2>&1 || true # ignore any errors conda deactivate > /dev/null 2>&1 || true # ignore any errors fi unset _CE_CONDA unset CONDA_DEFAULT_ENV unset CONDA_EXE unset CONDA_PREFIX unset CONDA_PROMPT_MODIFIER unset CONDA_PYTHON_EXE unset CONDA_SHLVL unset PYTHONPATH unset LD_PRELOAD unset LD_LIBRARY_PATH source /sdf/group/cryoem/sw/conda/etc/profile.d/conda.sh conda activate topaz topaz $@
- Make this file executable by running
chmod +x ~/topaz.sh
- When you run cryosparc, for the path to topaz executable, connect the file you just created (should be in a directory that looks like /sdf/home/<first letter of your username>/<your username>/topaz.sh )