Phriction Projects Wikis Bioimaging And Optics Platform Computers & Servers at the BIOP Software GPU and Deep Learning Resources Python venv Setup for Deep Learning Resources History Version 2 vs 25
Version 2 vs 25
Version 2 vs 25
Content Changes
Content Changes
This page aims to contain the setup in order to be able to run the deep learning tools that are currently being used at the BIOP
= Setup for Windows =
NOTE: This setup is intended for a workstation with a good GPU and Windows 10 Installed. It has been tested with the following cards:
**GTX Titan, GTX 1080, GTX 1080 Ti, RTX 2080 Ti**
== Software to Install ==
- [[ https://www.nvidia.com/Download/index.aspx | Download Latest NVIDIA Drivers ]] - We use the `Studio Drivers`
- [[ https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019 |Download Build Tools for Visual Studio 2019 ]] - Install the `Build tools for C++`, namely
- `MSVC v142 - VS 2019 C++ x64/x86 build tools`
- `Windows 10 SDK (10.0.18362.0)`
- [[ https://developer.nvidia.com/cuda-10.1-download-archive-update2?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exenetwork | Download CUDA Toolkit 10.1 Update 2]] - Install just the `Developer` and `Runtime` parts
- [[ https://developer.nvidia.com/compute/machine-learning/cudnn/secure/7.6.5.32/Production/10.1_20191031/cudnn-10.1-windows10-x64-v7.6.5.32.zip | Download CuDNN 7.6.5 for CUDA 10.1]] - Unzip into `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\`
- [[https://www.python.org/downloads/release/python-379/| Install Python 3.7]] - We install it for all users and add Python to the `PATH`
== Environment Variables ==
Create and add the two following environment variables. These are needed for compiling PyOpenCL, which is a dependency of `gpuools` for StarDist, but is beneficial for any other tools that use the GPU and may need compiling.
|VARIABLE NAME | Path (Default) |
|-------------------|-----------------|
|INCLUDE| C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include|
|LIB| C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64|
== Creating Virtual Environments ==
NOTE: Consider upgrading `pip` to the latest vesion before starting: `python -m pip install --upgrade pip`
To get started, we need to install `virtualenv` to manage our environments
```
pip install virtualenv
```
=== StarDist ===
We are going to create a `stardist-tf2` environment in the `D:\environments` drive
Start a command prompt and type
```
d:
mkdir environments
python -m venv environments\stardist-tf2
environments\stardist-tf2\Scripts\activate
```
(WARNING) **Checkpoint**: Ensure the right python version is installed using `where python` and you should have a result like below
```
D:\environments\stardist-tf2\Scripts\python.exe
C:\Users\oburri\AppData\Local\Programs\Python\Python37\python.exe
C:\Users\oburri\AppData\Local\Microsoft\WindowsApps\python.exe
```
Finally, we can install all of StarDist using the `stardist.txt` file below
`pip install -r stardist.txt`
{F15067175}
=== Noise2Void ===
Noise2Void currently needs a lower version of CUDA to function.
Installations
- [[ https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exenetwork | Download CUDA Toolkit 10.0 ]]
- [[ https://developer.nvidia.com/compute/machine-learning/cudnn/secure/7.6.5.32/Production/10.0_20191031/cudnn-10.0-windows10-x64-v7.6.5.32.zip | Download CuDNN 7.6.5 for CUDA 10.0]] - Unzip into `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\`
We are going to create a `n2v` environment in the `D:\environments` drive
Start a command prompt and type
```
d:
mkdir environments
python -m venv environments\n2v
environments\n2v\Scripts\activate
```
Finally, we can install all of Noise2Void using the `n2v.txt` file below
`pip install -r n2v.txt`
{F15067171}
= Setup for SCITAS GPU Clusters =
This page aims to contain the setup in order to be able to run the deep learning tools that are currently being used at the BIOP
= Setup for Windows =
NOTE: This setup is intended for a workstation with a good GPU and Windows 10 Installed. It has been tested with the following cards:
**GTX Titan, GTX 1080, GTX 1080 Ti, RTX 2080 Ti**
== Software to Install ==
- [[ https://www.nvidia.com/Download/index.aspx | Download Latest NVIDIA Drivers ]] - We use the `Studio Drivers`
- [[ https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019 |Download Build Tools for Visual Studio 2019 ]] - Install the `Build tools for C++`, namely
- `MSVC v142 - VS 2019 C++ x64/x86 build tools`
- `Windows 10 SDK (10.0.18362.0)`
- [[ https://developer.nvidia.com/cuda-10.1-download-archive-update2?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exenetwork | Download CUDA Toolkit 10.1 Update 2]] - Install just the `Developer` and `Runtime` parts
- [[ https://developer.nvidia.com/compute/machine-learning/cudnn/secure/7.6.5.32/Production/10.1_20191031/cudnn-10.1-windows10-x64-v7.6.5.32.zip | Download CuDNN 7.6.5 for CUDA 10.1]] - Unzip into `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\`
- [[https://www.python.org/downloads/release/python-379/| Install Python 3.7]] - We install it for all users and add Python to the `PATH`
== Environment Variables ==
Create and add the two following environment variables. These are needed for compiling PyOpenCL, which is a dependency of `gpuools` for StarDist, but is beneficial for any other tools that use the GPU and may need compiling.
|VARIABLE NAME | Path (Default) |
|-------------------|-----------------|
|INCLUDE| C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include|
|LIB| C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64|
== Creating Virtual Environments ==
NOTE: Consider upgrading `pip` to the latest vesion before starting: `python -m pip install --upgrade pip`
To get started, we need to install `virtualenv` to manage our environments
```
pip install virtualenv
```
=== StarDist ===
We are going to create a `stardist-tf2` environment in the `D:\environments` drive
Start a command prompt and type
```
d:
mkdir environments
python -m venv environments\stardist-tf2
environments\stardist-tf2\Scripts\activate
```
(WARNING) **Checkpoint**: Ensure the right python version is installed using `where python` and you should have a result like below
```
D:\environments\stardist-tf2\Scripts\python.exe
C:\Users\oburri\AppData\Local\Programs\Python\Python37\python.exe
C:\Users\oburri\AppData\Local\Microsoft\WindowsApps\python.exe
```
Finally, we can install all of StarDist using the `stardist.txt` file below
`pip install -r stardist.txt`
{F15067175}
=== Noise2Void ===
Noise2Void currently needs a lower version of CUDA to function.
Installations
- [[ https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exenetwork | Download CUDA Toolkit 10.0 ]]
- [[ https://developer.nvidia.com/compute/machine-learning/cudnn/secure/7.6.5.32/Production/10.0_20191031/cudnn-10.0-windows10-x64-v7.6.5.32.zip | Download CuDNN 7.6.5 for CUDA 10.0]] - Unzip into `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\`
We are going to create a `n2v` environment in the `D:\environments` drive
Start a command prompt and type
```
d:
mkdir environments
python -m venv environments\n2v
environments\n2v\Scripts\activate
```
Finally, we can install all of Noise2Void using the `n2v.txt` file below
`pip install -r n2v.txt`
{F15067171}
= Setup for SCITAS GPU Clusters =
c4science · Help