-
Notifications
You must be signed in to change notification settings - Fork 3
CSBDeep in Fiji – Installation
Download Fiji from the Fiji Download page and install it by simply unpacking it.
The plugins should run on macOS and Linux systems. We are working on Windows support.
- Go to
Help > Update...

- Open the update manager by clicking
Manage update sites - Add an update site with the URL
http://sites.imagej.net/CSBDeep/and the NameCSBDeepand close the 'Manage update sites' window again

- Click
Apply changesto install the plugin

- Restart Fiji
Note: TensorFlow GPU in Java is currently only available on Linux.
Install the NVIDIA requirements to run TensorFlow with GPU support as described in the TensorFlow Documentation.
NOTE:
- Make sure to use CUDA® Toolkit 8.0. (Helpful link)
- Make sure to use cuDNN v6.0
There are two options to make CUDA visible to Fiji and TensorFlow:
-
Add the path of CUDA and cuDNN to your
LD_LIBRARY_PATHenvironment variable. (This is also part of the installation instructions above) -
Always start Fiji from the command line:
$ /path/to/Fiji.app/ImageJ-linux64This makes sure the
LD_LIBRARY_PATHenvironment variable is set in Fiji.
NOTE:
- This will add CUDA and cuDNN to the system-wide library path
- CUDA and cuDNN will be available to all system users
- You need to have root access on the system (or ask your system admin)
- There may be differences for different Linux distributions (Tested on Linux Mint 18.1 Cinnamon 64-bit).
Add a file to /etc/ld.so.conf.d/ called cuda.conf with the content: (Replace the paths with the paths where CUDA and cuDNN are installed)
$ cat /etc/ld.so.conf.d/cuda.conf
/usr/local/cuda/lib64
/usr/local/cudnn/lib64
Run ldconfig to make the new libraries available:
$ sudo ldconfig
- Make sure your GPU fulfills the requirements for TensorFlow and install CUDA and cudNN as described in Installing TensorFlow
- Download and extract the Java Native Interface (JNI) file by executing the following shell commands:
$ export FIJI_HOME=/path/to/Fiji.app # Replace with the path to your Fiji installation
$ mkdir -p ${FIJI_HOME}/lib/linux64/
$ curl -L \
"https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow_jni-gpu-linux-x86_64-1.3.0.tar.gz" |
tar -xz -C ${FIJI_HOME}/lib/linux64
$ chmod +w ${FIJI_HOME}/lib/linux64/*
See Installing TensorFlow for Java for additional information.
If you have multiple CUDA enabled GPUs you may want to set the environment variable CUDA_VISIBLE_DEVICES to specify the GPU which should be used.
As CUDA will try to enumerate the GPUs by speed
$ export CUDA_VISIBLE_DEVICES=0
should give you only the fastest GPU. Execute this line before you start Fiji or put it into your ~/.bashrc or set the environment variable somewhere else like in ~/.pam_environment. See the documentation of your distribution for options on how to set environment variables.
Optional:
If this is not sufficient for your setup. You can find out the ID (in PCI bus order) of your GPU with:
$ nvidia-smi
Thu Sep 14 17:39:33 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.66 Driver Version: 375.66 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 NVS 310 Off | 0000:A1:00.0 N/A | N/A |
| 30% 56C P0 N/A / N/A | 294MiB / 961MiB | N/A Default |
+-------------------------------+----------------------+----------------------+
| 1 TITAN Xp Off | 0000:03:00.0 Off | N/A |
| 23% 28C P8 9W / 250W | 1MiB / 12189MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
and also set the environment variable CUDA_DEVICE_ORDER:
$ export CUDA_DEVICE_ORDER="PCI_BUS_ID"
$ export CUDA_VISIBLE_DEVICES=1
See the CUDA Programming Guide for more information.