Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Working with GPUs

Doug Blank edited this page Sep 17, 2018 · 3 revisions

Working with GPUs

Ubuntu 18.04

  1. Download Anaconda

Go to https://www.anaconda.com/download/ and download Anaconda for your operating system.

  1. Install Anaconda

Under Linux, that is:

chmod +x ~/Downloads/Anaconda3-5.2.0-Linux-x86_64.sh
~/Downloads/Anaconda3-5.2.0-Linux-x86_64.sh

During installation, select to have anaconda added to your path. That will add something like the following to your ~/.bashrc file:

export PATH="/home/dblank/anaconda3/bin:$PATH"

You'll either want to log out of your terminal and log back in, or source ~/.bashrc to get your updated path.

  1. Update Anaconda:
conda update conda
conda update anaconda
conda update python
conda update --all
  1. Create an environment
conda create --name tf-gpu
  1. Activate the environment:
source activate tf-gpu
  1. Install TensorFlow with support for GPUs:
conda install tensorflow-gpu
  1. Install the ConX dependencies that are provided via conda:
conda install keras ipywidgets Pillow h5py tqdm requests pydot matplotlib
  1. Install other, non-conda-based packages:
pip install svgwrite sklearn cairosvg conx
  1. Optional, but useful: install other, system-wide packages:
sudo apt install cython

To deactivate this environment:

source deactivate 

Then, next time, all you need to do is:

source activate tf-gpu
Clone this wiki locally