We have been very successful in setting up Miniconda to work with StarDist 2D using our GPUS on Windows 10 machines
What is great is that Anaconda manages the CUDA libraries for each TensorFlow version -> No NVIDIA installation steps.
NOTE: The most tedious part is the installation of `gputools` which helps speed up StarDist Training considerably.
IMPORTANT: This install makes use of **[[https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exenetwork| CUDA Toolkit 10.0]]** and is not compatible with older tensorFlow Versions. We run it here with TensorFlow 1.14
# Requirements
## Miniconda
Please install the latest version of Minconda for Windows 10, and Python 3.7
https://docs.conda.io/en/latest/miniconda.html
For us, as we use miniconda for multiple users, we select `Install for all users` when prompted during installation
## Build Tools for Visual Studio
StatDist needs to compile certain files, so you need a gcc compiler installed so that usually means the [[ https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019 | Build Tools for Visual Studio 2019 ]]
The minimum individual components that you need are the following:
1. `MSVC v142 - VS 2019 C++ x64/x86 build tools`
2. `Windows 10 SDK (10.0.18362.0)`
# NVIDIA CUDA Version 10.0
Download [[https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exenetwork| CUDA Toolkit 10.0]]
for the installation, you just need the `Developper` and `Runtime`
# Setup Environement Variables
To compile `pyopencl`, which is needed by `gputools` you need to ensure that the following two environement variables are set
|VARIABLE NAME | Path (Default) |
|-------------------|-----------------|
|INCLUDE| C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include|
|LIB| C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\lib\x64|
# StarDist conda environement
We provide the basic yml file for installing starDist and all dependencies, including JupyterLab
{F13864455}
Download the file above and from your `Anaconda prompt` prompt run the following:
```
conda env create -p DESIRED_PATH_TO_STARDIST -f PATH_TO\biop-deep.yml
```
For example
```
conda env create -p d:\stardist-env -f "C:\Users\oburri\Desktop\StarDist Install Full\biop-deep.yml"
```
# Testing your installation
## Download the StarDist repository: https://github.com/mpicbg-csbd/stardist
Unzip it somewhere to test it out
`eg. D:\stardist-repo`
## Activate the environment you just created
`conda activate d:\stardist-env`
##Navigate to the folder where you unzipped StarDist and Start Jupyter Lab
```
d:
cd stardist-repo
jupyter lab
```
Try to run the 2D demos with the GPU option set to True
```