Skip to content

Ubuntu 18.04 with GPU

Peter Leonard edited this page Aug 2, 2021 · 11 revisions
  1. Start with a blank hard drive and this set of recommendations from Puget Systems. (Make sure you follow their recommendation to install build-essential in step 6, which contains the gcc compiler you'll need for the hdbscan module later on.)

  2. In step 6 of the Puget Systems walkthrough, install nvidia-driver-460 (current as of August 2021) instead of nvidia-390.

  3. Once your graphical desktop is set up and configured, check the Additional Drivers tab of Software & Updates to ensure that you are using Nvidia-460 (it should be described by Ubuntu as "proprietary".)

  4. Install anaconda.

  5. Create a new environment for pixplot:

conda create --name pixplot python=3.7

conda activate pixplot

  1. Get the basics of CUDA and cuDNN set up:

conda install cudatoolkit=11

conda install -c anaconda cudnn

  1. Install pixplot and supporting packages:

pip install https://github.com/yaledhlab/pix-plot/archive/master.zip

pip install tensorflow-gpu

pip install image_datasets (a helper utility to easily grab pixplot-ready datasets)

  1. Get a sample dataset:

python

import image_datasets

image_datasets.oslomini.download()

(now exit python)

  1. Test the installation:

time pixplot --images="datasets/oslomini/images/*.jpg" --metadata="datasets/oslomini/metadata/metadata.csv" --shuffle

In another terminal window, you can run watch -n 0.1 nvidia-smi to monitor how TensorFlow uses your GPU.