Set up a Python3 Environment

Provides instructions for setting up and activating a Python3 environment.

This procedure assumes that a Python3 environment has not already been set up.

If a Python3 environment is not set up with numpy, the system will return the following warning when loading the analytics module and using Hyperparameter Optimization (HPO):
INFO: CrayAI HPO requires the numpy module to be installed with python3, \
but no numpy support was detected.
INFO: Now attempting to load module cray-python to provide numpy support.
INFO: No cray-python available. In order to use the CrayAI HPO Module, \
please set up a python3 environment with numpy support.
There are two correct options for the Python environment and there should be no performance difference between these two options with respect to the HPO module:
  1. Using Cray-python, which will be loaded by default if available. In this case, the INFO warning above will be displayed without the last line.
  2. Using a user-defined Python3 environment, which must be done by the user ahead of time. Python3 must be available when loading the module or else the module will fail to load.
This procedure shows how to install and activate a Python3 environment. Although there are several tools that can be used for this purpose, it is recommended to use miniconda, which is used in this procedure.
  1. SSH to the login node.
  2. Download and install miniconda by following the instructions documented at https://docs.conda.io/en/latest/miniconda.html
  3. After installation, start a new shell to use Conda. Log out and log back in.
  4. Create a Conda environment. The Conda environment should run Python 3.7.
    $ conda create --name=py3-hpo python=3.7 numpy
  5. Activate your Conda environment.
    $ conda activate py3-hpo
    (py3-hpo) [username@hostname-mgmt1 ~]$ python3
    Python 3.7 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31) 
    [GCC 7.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
  6. Deactivate the Conda environment if needed.
    $ conda deactivate