PPPLDeepLearning / plasma-python

PPPL deep learning disruption prediction package
http://tigress-web.princeton.edu/~alexeys/docs-web/html/
79 stars 43 forks source link

Add platform-dependent Conda YAML and environments/module dependencies #47

Closed felker closed 4 years ago

felker commented 4 years ago

The current requirements-travis.txt in the root directory of the repository should be converted to a YAML format that complies with the Conda environment format. Especially note the version range formatting: https://docs.conda.io/projects/conda-build/en/latest/resources/package-spec.html#package-match-specifications

requirements.yaml should contain the Conda dependencies for a generic (GPU?) platform.

We will probably want to have custom Conda environments files for each of the following computers, mostly to handle the non-default Conda channels that may be necessary (e.g. IBM Watson AI for the 2x Power9 architectures with V100s). But we also want to set strict channel priority, be more specific about compatible dependency version ranges, etc.

Also, I am in favor of storing files such as traverse-env.cmd containing the following lines, e.g.:

#!/usr/bin/env bash

module load anaconda3
conda activate frnn  # must activate conda env before module loads
export OMPI_MCA_btl="tcp,self,vader"

module load cudatoolkit
module load cudnn/cuda-10.1/7.6.1  
module load openmpi/gcc/3.1.4/64
module load hdf5/gcc/openmpi-3.1.4/1.10.5

This will make it easier for the user to build FRNN on each platform after creating the Conda environment, e.g. from the new directory named envs/ or environments/:

conda env create --file envs/requirements-traverse.yaml
# alternative: "conda create --name frnn --file traverse.yaml"
source traverse-env.cmd
python setup.py install

See Sample Installation on TigerGPU, for example.

Also, examples/slurm.cmd can source the exact same modules in the .cmd file for consistency.

However, this will require frequent updates to the *.cmd files as system admins upgrade the modules and libraries on the various platforms.

Current limitations of Conda YAML format: