# Setting up a fully featured GPU single cell enviroment

**URL:** <https://discourse.scverse.org/t/setting-up-a-fully-featured-gpu-single-cell-enviroment/707>\
**Category:** Ecosystem\
**Tags:** gpu\
**Created:** [August 24, 2022, 5:36pm UTC](https://discourse.scverse.org/t/setting-up-a-fully-featured-gpu-single-cell-enviroment/707 "2022-08-24T17:36:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Intron7](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/intron7/32/73_2.png) [@Intron7](https://discourse.scverse.org/u/Intron7)\
**Post date:** [August 24, 2022, 5:36pm UTC](https://discourse.scverse.org/t/setting-up-a-fully-featured-gpu-single-cell-enviroment/707/1 "2022-08-24T17:36:21Z")

</div>

Hi everyone,

I have been playing around a lot with analysing single cell RNA datasets on GPUs. Setting up the environments is kind of a pain so created I a guide to help with the conda envirmoment setup.  
You can check it out at: [GitHub - Intron7/GPU\_SingleCell\_Setup: Guides to create Conda environments for single cell analysis that leverage GPU acceleration for faster computing](https://github.com/Intron7/GPU_SingleCell_Setup)  
If want more tools included, I can try to also fit them into the enviroment. So tell me whats missing.

Yours Severin

---

<div class="post-metadata">

**Author:** ![adamgayoso](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/adamgayoso/32/100_2.png) [@adamgayoso](https://discourse.scverse.org/u/adamgayoso)\
**Post date:** [August 24, 2022, 8:49pm UTC](https://discourse.scverse.org/t/setting-up-a-fully-featured-gpu-single-cell-enviroment/707/2 "2022-08-24T20:49:55Z")

</div>

Thanks for this! I think it should work to make a conda env yaml file that works with all of these packages rather than just a guide. I would also consider using mamba in your guide as it’s much faster than conda. Also:

- All scverse packages are on conda, so I would try to use conda-forge distributed packages as much as possible.
- In the case of jax, it can also be installed via [conda-forge](https://anaconda.org/conda-forge/jax). I noticed to get jax gpu working via conda it was necessary to install [Cudatoolkit Dev :: Anaconda.org](https://anaconda.org/conda-forge/cudatoolkit-dev)

there might be some caveats with the computer’s nvidia driver versions though

---

<div class="post-metadata">

**Author:** ![Intron7](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/intron7/32/73_2.png) [@Intron7](https://discourse.scverse.org/u/Intron7)\
**Post date:** [August 24, 2022, 10:10pm UTC](https://discourse.scverse.org/t/setting-up-a-fully-featured-gpu-single-cell-enviroment/707/3 "2022-08-24T22:10:53Z")

</div>

I personally have not worked with mamba yet, but if its faster i’ll give it a try. About the conda-forge packages. The Rapids packages are really picky what you can and cannot install with them in a conda env. In Version 22.02 it was still possible to install scanpy via conda-forge together with rapids. In version 22.04 and 22.06 this doesn’t work anymore. I haven’t tested this with release 22.08 yet. The next issue it that rapids and pytorch work with different cuda versions (rapids 11.5, pytorch 11.6) This is why install it in such a way and order. If there is a better way please let me know. Another issue with conda environment is that tensorboard (needed for scvi-tools) requires protobuf 3.19.X and rapids need at least 3.20.1. Everything works to my knowledge if you install protobuf manually after installing scvi-tools. I don’t think conda or mamba would resolve this conflict. I’ll never the less try to create a yaml file to make the setup even easier.
