Phriction Projects Wikis Bioimaging And Optics Platform Computers & Servers at the BIOP Software TensorFlow GPU & CARE History Version 11 vs 12
Version 11 vs 12
Version 11 vs 12
Content Changes
Content Changes
Installing TensorFlow with GPU Support for Windows in order to use CARE
= Prerequisites =
# Get latest [[https://www.geforce.com/drivers|NVIDIA drivers]]
# Get [[https://developer.nvidia.com/cuda-10.0-download-archive|CUDA 10.0 Toolkit]]
# Get [[https://developer.nvidia.com/rdp/cudnn-download|cuDNN for CUDA 10.0]] (Needs you to login)
# Get [[https://www.python.org/downloads/|Python 3.7 x64]]
# Get [[https://nodejs.org/en/|NodeJS ]]
Install everything with defaults except Python. Mae sure to add Python to the PATH
Everything installs automatically except for cuDNN. For cuDNN, copy paste the contents of the zip file into
`C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0`
After installing python, install pip and virtualenv.
Start `cmd` as an administrator and use
`python -m pip install --upgrade pip`
`pip install virtualenv`
= Setup =
== 1. Create the virtual environement wherever you want, for example `D:\CARE-TF-GPU` ==
`virtualenv -p python D:\CARE-TF-GPU\`
==2. Activate the virtual environement ==
```d:
cd CARE-TF-GPU
Scripts\activate
```
== 3. Install `tensorflow-gpu`, `csbdeep` and `jupyter notebook` ==
`pip install tensorflow-gpu csbdeep jupyter notebook`
== 4. Check that the `jupyter notebook` is loading the right kernel with ==
`jupyter kernelspec list`
And your output should look like this
```
Available kernels:
python3 d:\care-tf-gpu\share\jupyter\kernels\python3
```
= Test =
Launch Jupyter Notebook with
`jupyter notebook`
Make a new Notebook and run a new cell with
```lang=python
import tensorflow as tf
with tf.device('/gpu:0'):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
with tf.Session() as sess:
print (sess.run(c))
```
= Magic BAT file for installation =
```
@echo off
set installPath=D:\CARE-TF-GPU2
echo %installPath%
python -m pip install --upgrade pip
pip install virtualenv
virtualenv -p python %installPath%
cmd /k " cd /D %installPath%\Scripts\ & activate & pip install tensorflow-gpu csbdeep jupyter notebook & jupyter kernelspec list"
PAUSE
```
Installing TensorFlow with GPU Support for Windows in order to use CARE
= Prerequisites =
# Get latest [[https://www.geforce.com/drivers|NVIDIA drivers]]
# Get [[https://developer.nvidia.com/cuda-10.0-download-archive|CUDA 10.0 Toolkit]]
# Get [[https://developer.nvidia.com/rdp/cudnn-download|cuDNN for CUDA 10.0]] (Needs you to login)
# Get [[https://www.python.org/downloads/|Python 3.7 x64]]
# Get [[https://nodejs.org/en/|NodeJS ]]
Install everything with defaults except Python. Mae sure to add Python to the PATH
Everything installs automatically except for cuDNN. For cuDNN, copy paste the contents of the zip file into
`C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0`
After installing python, install pip and virtualenv.
Start `cmd` as an administrator and use
`python -m pip install --upgrade pip`
`pip install virtualenv`
= Setup =
== 1. Create the virtual environement wherever you want, for example `D:\CARE-TF-GPU` ==
`virtualenv -p python D:\CARE-TF-GPU\`
==2. Activate the virtual environement ==
```d:
cd CARE-TF-GPU
Scripts\activate
```
== 3. Install `tensorflow-gpu`, `csbdeep` and `jupyter notebook` ==
`pip install tensorflow-gpu csbdeep jupyter notebook`
== 4. Check that the `jupyter notebook` is loading the right kernel with ==
`jupyter kernelspec list`
And your output should look like this
```
Available kernels:
python3 d:\care-tf-gpu\share\jupyter\kernels\python3
```
= Test =
Launch Jupyter Notebook with
`jupyter notebook`
Make a new Notebook and run a new cell with
```lang=python
import tensorflow as tf
with tf.device('/gpu:0'):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
with tf.Session() as sess:
print (sess.run(c))
```
= Magic BAT file for installation =
```
@echo off
set installPath=D:\CARE-TF-GPU-N2V
echo %installPath%
python -m pip install --upgrade pip
pip install virtualenv
virtualenv -p python %installPath%
cmd /k "cd /D %installPath%\Scripts\ & activate & pip install tensorflow-gpu nodejs csbdeep tensorflow-gpu jupyterlab jupyter_tensorboard ipywidgets widgetsnbextension scikit-image & jupyter labextension install @jupyter-widgets/jupyterlab-manager &jupyter labextension install jupyterlab_tensorboard & jupyter kernelspec list
PAUSE
```
Installing TensorFlow with GPU Support for Windows in order to use CARE
= Prerequisites =
# Get latest [[https://www.geforce.com/drivers|NVIDIA drivers]]
# Get [[https://developer.nvidia.com/cuda-10.0-download-archive|CUDA 10.0 Toolkit]]
# Get [[https://developer.nvidia.com/rdp/cudnn-download|cuDNN for CUDA 10.0]] (Needs you to login)
# Get [[https://www.python.org/downloads/|Python 3.7 x64]]
# Get [[https://nodejs.org/en/|NodeJS ]]
Install everything with defaults except Python. Mae sure to add Python to the PATH
Everything installs automatically except for cuDNN. For cuDNN, copy paste the contents of the zip file into
`C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0`
After installing python, install pip and virtualenv.
Start `cmd` as an administrator and use
`python -m pip install --upgrade pip`
`pip install virtualenv`
= Setup =
== 1. Create the virtual environement wherever you want, for example `D:\CARE-TF-GPU` ==
`virtualenv -p python D:\CARE-TF-GPU\`
==2. Activate the virtual environement ==
```d:
cd CARE-TF-GPU
Scripts\activate
```
== 3. Install `tensorflow-gpu`, `csbdeep` and `jupyter notebook` ==
`pip install tensorflow-gpu csbdeep jupyter notebook`
== 4. Check that the `jupyter notebook` is loading the right kernel with ==
`jupyter kernelspec list`
And your output should look like this
```
Available kernels:
python3 d:\care-tf-gpu\share\jupyter\kernels\python3
```
= Test =
Launch Jupyter Notebook with
`jupyter notebook`
Make a new Notebook and run a new cell with
```lang=python
import tensorflow as tf
with tf.device('/gpu:0'):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
with tf.Session() as sess:
print (sess.run(c))
```
= Magic BAT file for installation =
```
@echo off
set installPath=D:\CARE-TF-GPU2-N2V
echo %installPath%
python -m pip install --upgrade pip
pip install virtualenv
virtualenv -p python %installPath%
cmd /k " cd /D %installPath%\Scripts\ & activate & pip install tensorflow-gpu csbdeep jupyter notebook & jupyter kernelspec list"
nodejs csbdeep tensorflow-gpu jupyterlab jupyter_tensorboard ipywidgets widgetsnbextension scikit-image & jupyter labextension install @jupyter-widgets/jupyterlab-manager &jupyter labextension install jupyterlab_tensorboard & jupyter kernelspec list
PAUSE
```
c4science · Help