Installation
instructions for installing cryoDRGN
Quick Install
As of March 2023, cryoDRGN is available as a PyPI package and may be installed with pip
.
You may also choose to install the early beta version of cryoDRGN available through our TestPyPI release channel:
Detailed installation instructions
We provide installation instructions assuming an Anaconda environment for managing dependencies. Anaconda is a python package/environment manager which can handle complex dependencies between Python packages through the creation of python environments. We recommended creating a separate environment for cryodrgn to prevent any conflicts among dependencies with other software packages.
Compute/hardware requirements:
High performance linux workstation or cluster
NVIDIA GPUs
Dependencies:
python
pytorch
cudatoolkit
numpy
pandas
Additional dependencies for visualization:
matplotlib
seaborn
scipy 1.4.0+
scikit-learn
umap
jupterlab
ipywidgets
plotly and cufflinks
The software has been tested on Python 3.7-3.9 and pytorch 1.0-1.7, 1.12.
1) Install anaconda
For most platforms, the installation typically consists of a shell script (e.g. Anaconda Installers) that you execute on the command line which will prompt you to install and choose a base directory where all the downloaded software and environments will go.
See the official Anaconda documentation and follow their installation instructions here.
Once your anaconda environment is activated, your anaconda environment should be indicated on the command line, e.g.:
(base) $
2) Setting up the cryoDRGN environment
First, create a new conda environment named
cryodrgn
(or renamed as appropriate):Activate the environment. Your command prompt will usually indicate the environment you are in with
(environment name)
before the prompt:
3) Install cryoDRGN with pip
Option 1: Install with pip
Option 2: Install from the source code
Install pytorch and cudatoolkit into your new cryodrgn environment:
Replace the cudatoolkit version with the appropriate version of CUDA installed with the GPU drivers. You can check the CUDA version with
nvidia-smi
.Don't forget to include
-c pytorch
to get the software from the official pytorch channelTo customize the installation line depending on your situation, look at Pytorch's Start locally.
Obtain cryodrgn source code by cloning the git repository, and then doing a
pip install .
in the checkout folder. This will also install dependencies thatcryoDRGN
depends on.
Alternatively, if you prefer not to use git, you can directly download a ZIP file of the latest release from https://github.com/zhonge/cryodrgn/releases. For example, if the latest release is
cryodrgn-3.3.0.zip
:
Alternatively, you can also install dependencies manually with conda instead of pip.
4) Testing the Installation
Once installed, you should be able to call the cryodrgn
executable and see a list of commands:
There is a small testing dataset in the source code that you can use to run cryodrgn and verify that all the dependencies were installed correctly:
It should take ~20 seconds to run and reach a final loss around 0.08 in version 1.0 and 0.03 in version 1.1+. The output should look something like:
You will want to verify that the output contains
Use cuda True
in the first few lines to ensure thatcryoDRGN
will be using your GPU for training.
Updating cryoDRGN
To update to a later version, you need to obtain the updated software either with git checkout <version>
or direct download from https://github.com/zhonge/cryodrgn, then rerun $ pip install .
in your cryodrgn anaconda environment:
To keep multiple versions of cryoDRGN in parallel, you will need to create a new anaconda environment and re-install all the dependencies.
Known Issues
If you run into any issues getting cryoDRGN installed, please file a github issue, including all the commands you used and their output. This Issues page is also a good place to check first if you encounter problems running our software!
Last updated