Difference between revisions of "Installing local software"

From DeepSense Docs
Jump to: navigation, search
(Adding a python3 environment)
Line 56: Line 56:
 
The dependencies must be installed in whichever python environment you intend to use. We've encountered some problems installing the PyTorch dependencies directly in the base environment if the base conda environment has been updated to conda version 4.6.2. If you want to use PyTorch, be sure to use a conda environment with a lower version of conda.
 
The dependencies must be installed in whichever python environment you intend to use. We've encountered some problems installing the PyTorch dependencies directly in the base environment if the base conda environment has been updated to conda version 4.6.2. If you want to use PyTorch, be sure to use a conda environment with a lower version of conda.
  
=== Testing Deep Learning packages on the login nodes ===
+
=== Install other dependencies ===
  
If you attempt to run the deep learning software like PowerAI on the login nodes or CPU-only nodes then you will see errors like the following:
+
If you need additional python libraries then you can install them in your python environment.
 +
 
 +
The base package comes with several python libraries but you may want a newer version or additional libraries. Also, when you create a new environment it does not automatically get all of the same libraries as the base environment.
 +
 
 +
For example, suppose you want to install the <code>scikit-learn</code> package in your python3 environment.
 +
 
 +
First you need to activate the environment:
 +
conda activate py36
 +
 
 +
Then you install the package
 +
conda install scikit-learn
 +
 
 +
=== Testing Deep Learning packages on the login nodes or non-GPU nodes ===
 +
 
 +
You may wish to run PowerAI software on the login nodes for testing on the CPU-only nodes for some workflows.
 +
 
 +
Only the GPU nodes have graphics cards and graphics drivers installed. If you attempt to run the deep learning software like PowerAI on the login nodes or CPU-only nodes then you will see errors like the following:
 
  ImportError: libcublas.so.9.2: cannot open shared object file: No such file or directory
 
  ImportError: libcublas.so.9.2: cannot open shared object file: No such file or directory
  
 
You need to load the GPU drivers with the following command:
 
You need to load the GPU drivers with the following command:
 
  source /opt/DL/cudnn/bin/cudnn-activate
 
  source /opt/DL/cudnn/bin/cudnn-activate
 +
 +
Then you can activate the deep learning package, e.g. for Tensorflow:
 +
source /opt/DL/tensorflow/bin/tensorflow-activate
  
 
Note that some deep learning software may be much slower or refuse to run without GPU access. Tensorflow works but Caffe does not.
 
Note that some deep learning software may be much slower or refuse to run without GPU access. Tensorflow works but Caffe does not.
 +
 +
Keep in mind you need to activate the GPU drivers and deep learning package in each browser shell before you are able to use the package in your code or LSF jobs.

Revision as of 13:21, 12 March 2019

Introduction

You are welcome to install software locally in your home directory. This allows you to use specific versions of software instead of the cluster wide versions. For example you may need an older version of a specific package or a newly released version that isn't yet installed on DeepSense.

For assistance installing or compiling software contact Technical Support

If your project has specific software you want to share between members then we can create a shared directory for your group in /software/<project>

Installing Anaconda Python in your home directory

Stop using systemwide anaconda

If you added the system anaconda environment to your .bashrc file then remove the line:

. /opt/anaconda2/etc/profile.d/conda.sh

Installing Anaconda with a python2 base

From your home directory run:

wget https://repo.continuum.io/archive/Anaconda2-5.2.0-Linux-ppc64le.sh
bash Anaconda2-5.2.0-Linux-ppc64le.sh

Note: please enter "yes" when asked if you want to add anaconda to your .bashrc file. If you do not then you will need to add the following command to your .bashrc file or run it each time before using anaconda:

~/anaconda2/etc/profile.d/conda.sh

After the installer ends you need to either close and restart your terminal or run:

source ~/.bashrc

Adding a python3 environment

The previous instruction creates a python2 base environment. To add a python3 environment:

conda create -n py36 python=3.6

Activate this environment to use python3:

conda activate py36

note: if you receive an error message then you may need to deactivate the base conda environment first:

conda deactivate
conda activate py36

Adding a python2 environment

We recommend creating a separate python2 environment from the base environment. This makes it easier to install the specific packages required for IBM PowerAI.

conda create -n py27 python=2.7

Activate this environment to use python2:

conda activate py27

Install PowerAI dependencies

Warning: these scripts will install, update, and downgrade some packages to the recommended packages for the current version of PowerAI. You may want to create a separate python environment to use different versions of those packages with other software.

To use Tensorflow first install the Tensorflow dependencies:

/opt/DL/tensorflow/bin/install_dependencies

To use PyTorch first install the PyTorch dependencies:

/opt/DL/pytorch/bin/install_dependencies

The dependencies must be installed in whichever python environment you intend to use. We've encountered some problems installing the PyTorch dependencies directly in the base environment if the base conda environment has been updated to conda version 4.6.2. If you want to use PyTorch, be sure to use a conda environment with a lower version of conda.

Install other dependencies

If you need additional python libraries then you can install them in your python environment.

The base package comes with several python libraries but you may want a newer version or additional libraries. Also, when you create a new environment it does not automatically get all of the same libraries as the base environment.

For example, suppose you want to install the scikit-learn package in your python3 environment.

First you need to activate the environment:

conda activate py36

Then you install the package

conda install scikit-learn

Testing Deep Learning packages on the login nodes or non-GPU nodes

You may wish to run PowerAI software on the login nodes for testing on the CPU-only nodes for some workflows.

Only the GPU nodes have graphics cards and graphics drivers installed. If you attempt to run the deep learning software like PowerAI on the login nodes or CPU-only nodes then you will see errors like the following:

ImportError: libcublas.so.9.2: cannot open shared object file: No such file or directory

You need to load the GPU drivers with the following command:

source /opt/DL/cudnn/bin/cudnn-activate

Then you can activate the deep learning package, e.g. for Tensorflow:

source /opt/DL/tensorflow/bin/tensorflow-activate

Note that some deep learning software may be much slower or refuse to run without GPU access. Tensorflow works but Caffe does not.

Keep in mind you need to activate the GPU drivers and deep learning package in each browser shell before you are able to use the package in your code or LSF jobs.