Skip to content

Commit

Permalink
update install instructions to prefer building cupy (#108)
Browse files Browse the repository at this point in the history
* switch install preference due to significant speed-up building can offer

* update text

* Update README.md

Co-authored-by: Sander Roet <[email protected]>

---------

Co-authored-by: Sander Roet <[email protected]>
  • Loading branch information
McHaillet and sroet authored Feb 14, 2024
1 parent 1580386 commit 4bad669
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,40 @@ nvidia-cuda-toolkit

## Installation

There are 2 options for creating a conda environment:
There are 2 options for creating a conda environment. We recommend option (1) which will later allow cupy to build
against a system installed cuda-toolkit. Compared to option (2) this can give an almost two-fold speedup:

1. **(recommended)** Create a new environment with a prebuild cupy version and complete CUDA-toolkit. This is reliable but takes more disk space.
1. **(recommended)** Create a new python 3 environment:

```commandline
conda create -n pytom_tm -c conda-forge python=3 cupy cuda-version=11.8
conda create -n pytom_tm python=3
```
2. Create a new environment without cupy and let pip build against a system installed CUDA-toolkit.
2. Create a new environment with a prebuild cupy version and complete CUDA-toolkit. This is more reliable, but takes more
disk space and has less optimal performance.
```commandline
conda create -n pytom_tm python=3
conda create -n pytom_tm -c conda-forge python=3 cupy cuda-version=11.8
```
Once the environment is created, activate it:
```commandline
conda activate pytom_tm
```

Then clone the repository and install it with pip:
Then clone the repository and install it with pip (building cupy can take a while!):

```commandline
git clone https://github.com/SBC-Utrecht/pytom-template-matching-gpu.git
cd pytom-template-matching-gpu
python -m pip install '.[plotting]'
```

The installation above also adds the optional dependencies `[matplotlib, seaborn]` which are required to run `pytom_estimate_roc.py`. They are not essential to the core template matching fucntionality, so for some systems (such as certain cluster environments) it might be desirable to skip them. In that case remove `[plotting]` from the pip install command:
The installation above also adds the optional dependencies `[matplotlib, seaborn]` which are required to run
`pytom_estimate_roc.py`. They are not essential to the core template matching functionality, so for some systems
(such as certain cluster environments) it might be desirable to skip them. In that case remove `[plotting]` from the pip install command:

```commandline
python -m pip install .
Expand Down

0 comments on commit 4bad669

Please sign in to comment.