Installation¶
We provided two options for users to set up the execution environment: - we provide the envrionment YML file so that one can set up the execution environment with it directly; - we provide the detailed steps and commands to install each required package.
Before starting, be sure to have the git and Anaconda3 installed (alternatively, you can also use Miniconda3 instead of Anaconda3, which has been tested by us and works well for our demo).
Set up from the YML file¶
Get and clone the github repository:
git clone https://github.com/FAIR-UMN/FAIR-UMN-ECAL
Switch to
FAIR-UMN-ECAL``(or ``FAIR-UMN-CDMS
) (Note:XXX
here indicates the upper directory ofFAIR-UMN-ECAL
(orFAIR-UMN-CDMS
). For example, if you cloneFAIR-UMN-ECAL``(or ``FAIR-UMN-CDMS
) under/home/Download
, then you should replaceXXX
with/home/Download
.):cd XXX/FAIR-UMN-ECAL (or cd XXX/FAIR-UMN-CDMS)
Deactivate conda base environment first you are in (otherwise, go to step 4 directly) (We use Anaconda3 ):
conda deactivate
Create a new conda environment with the YML file (choose GPU or CPU version according to your computational resources).
GPU version run:
conda env create -f fair_gpu.yml
CPU version run:
conda env create -f fair_cpu.yml
Activate conda environment.
If you choose the GPU version in Step4:
conda activate fair_gpu
If you choose the CPU version in Step4:
conda activate fair_cpu
You are now ready to explore the codes/models! Please remember to check the
src/MAIN.ipynb
first.
Set up from the source¶
Get and clone the github repository:
git clone https://github.com/FAIR-UMN/FAIR-UMN-ECAL
Switch to
FAIR-UMN-ECAL``(or ``FAIR-UMN-CDMS
) (Note:XXX
here indicates the upper directory ofFAIR-UMN-ECAL``(or ``FAIR-UMN-CDMS
). For example, if you cloneFAIR-UMN-ECAL``(or ``FAIR-UMN-CDMS
) under/home/Download
, then you should replaceXXX
with/home/Download
.):cd XXX/FAIR-UMN-ECAL (or cd XXX/FAIR-UMN-CDMS)
Deactivate conda base environment first you are in (otherwise, go to step 4 directly) (We use Anaconda3 ):
conda deactivate
Create a new conda environment:
conda create -n fair_umn python=3.6
Activate conda environment:
conda activate fair_umn
Install Pytorch (choose GPU or CPU version according to your computational resources).
GPU version run:
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
CPU version run:
conda install pytorch torchvision torchaudio cpuonly -c pytorch
Install scikit-learn/pandas/matplotlib/numpy/seaborn/tqdm/Jupyter notebook:
pip install scikit-learn pip install pandas pip install matplotlib pip install numpy pip install seaborn pip install tqdm pip install notebook
You are now ready to explore the codes/models! Please remember to check the
src/MAIN.ipynb
first.
Note: To install Anaconda, please follow its official guideline. For example, to install Anaconda3 on Linux, check the Linux doc; to install Anaconda3 on Windows, check the Windows doc; and to install Anaconda3 on macOS, check the Mac doc. We test our model on Ubuntu, Windows, and macOS.
Dependencies¶
pytorch
scikit-learn
pandas
matplotlib
numpy
seaborn
tqdm
notebook