marcnol / pyHiM

Multiplexed DNA-FISH data analysis pipeline
GNU Lesser General Public License v3.0
4 stars 2 forks source link

use multiple GPUs for segmentation #246

Open marcnol opened 3 weeks ago

marcnol commented 3 weeks ago

apparently by doing

$ export CUDA_VISIBLE_DEVICES=0

or

$ export CUDA_VISIBLE_DEVICES=1

and then tf.device("/gpu:0") inside the python code one should direct different jobs to different GPUs.

Alternatively:

export CUDA_VISIBLE_DEVICES=$(nvidia-smi --query-gpu=memory.free,index --format=csv,nounits,noheader | sort -nr | head -1 | awk '{ print $NF }')