Conda Cheat Sheet - ezCGP/ezCGP GitHub Wiki
How I made yaml file
I started with a fresh conda environment with the conda-forge channel and then added the packages that I thought I would need. Then I exported the environment list into a yaml file.
conda create -n temp python=3.7 -c conda-forge
conda activate temp
conda install typing numpy pandas matplotlib scipy six pillow opencv scikit-learn mpi4py
pip install deap
pip install Augmentor
pip install tensorflow-gpu==2.2.0
conda env export > conda_environment.yml
Note, python3.8 had troubles installing opencv with conda-forge channel so I moved to python3.7. And mpi4py doesn't work with Windows conda installs so use pip, BUT pip install mpi4py failed miserably on my linux system, so I used conda.
PyTorch instead of TensorFlow
conda create -n temp python=3.7 -c conda-forge
conda activate temp
conda install typing numpy pandas matplotlib scipy six pillow opencv scikit-learn mpi4py
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
pip install deap
pip install Augmentor
conda env export > conda_pytorch_environment.yml
Misc stuff for GPU
On PACE-ICE and ICEhammer I had to also install this (cudnn 7.6.5 for cuda 10.1) into the conda environment
conda install https://anaconda.org/anaconda/cudnn/7.6.5/download/linux-64/cudnn-7.6.5-cuda10.1_0.tar.bz2
How to make conda env with yaml file
conda create -n ezcgp-py --file environment.yaml
OR
conda env create --file environment.yaml
Here is a bit of a cheat sheet list of commands:
- list all available environments
conda info --envs
- launch a python environment
conda activate [env_name]
- end the environment
conda deactivate
- list all packages/modules in the environment
conda list --explicit
- remove an environment
conda remove -n [env_name] --all