-
Notifications
You must be signed in to change notification settings - Fork 26
/
installer.sh
executable file
·84 lines (70 loc) · 3.23 KB
/
installer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
cd "${0%/*}" || exit 1 # run from this directory
set -e # exit when any command fails
# checking if conda installed
if ! [ -x "$(command -v conda)" ]; then
if [ "$(uname)" == "Darwin" ]; then
curl -k https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ./install/miniconda.sh
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ./install/miniconda.sh
else
echo "Unrecongnized Operating System, PuMA cannot be installed."
exit 1
fi
chmod +x ./install/miniconda.sh
./install/miniconda.sh -b -p $HOME/miniconda
eval "$($HOME/miniconda/bin/conda shell.bash hook)"
conda init
rm ./install/miniconda.sh
fi
cd install
eval "$(conda shell.bash hook)"
echo " _______ _______ _______ _______"
echo " ____ ______ "
echo "/\ _\`\ /'\_/\`\/\ _ \ "
echo "\ \ \L\ \__ __/\ \ \ \L\ \ "
echo " \ \ ,__/\ \/\ \ \ \__\ \ \ __ \ "
echo " \ \ \/\ \ \_\ \ \ \_/\ \ \ \/\ \ "
echo " \ \_\ \ \____/\ \_\\ \_\ \_\ \_\ "
echo " \/_/ \/___/ \/_/ \/_/\/_/\/_/ "
echo " _______ _______ _______ _______ "
# creating puma conda env if it doesn't exist
if [ ! -d "$(conda info --base)/envs/puma" ]; then
echo "Creating puma conda environment."
if [ "$(uname)" == "Darwin" ]; then
curl -Ls https://micro.mamba.pm/api/micromamba/osx-64/latest | tar -xvj bin/micromamba
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
else
echo "Unrecongnized Operating System, PuMA cannot be installed."
exit 1
fi
mv bin/micromamba .
if [ "$(uname)" == "Darwin" ]; then
./micromamba create -p $CONDA_PREFIX/envs/puma python numpy>=1.23 scikit-image scipy=1.11 matplotlib pyvista fftw eigen openmp cmake qt swig pip cython scikit-umfpack jupyterlab ipyvtklink ipympl -c conda-forge -y
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
./micromamba create -p $CONDA_PREFIX/envs/puma python numpy>=1.23 scikit-image scipy=1.11 matplotlib pyvista fftw eigen openmp cmake qt>=5.15.4 swig pip cython scikit-umfpack jupyterlab ipyvtklink ipympl -c conda-forge -y
else
echo "Unrecongnized Operating System, PuMA cannot be installed."
exit 1
fi
fi
####### PUMA C++ INSTALLATION ######
echo -e "\nStarting PuMA installation.\n"
chmod +x ./puma_installer.sh
./puma_installer.sh
###### TEXGEN INSTALLATION ######
echo -e "\nStarting texgen installation.\n"
chmod +x ./texgen_installer.sh
./texgen_installer.sh
###### PUMAPY INSTALLATION ######
echo -e "\nStarting pumapy installation.\n"
chmod +x ./pumapy_installer.sh
./pumapy_installer.sh
###### PUMA GUI INSTALLATION ######
echo -e "\nStarting GUI installation."
chmod +x ./gui_installer.sh
./gui_installer.sh
echo -e "\nThe PuMA C++ library, pumapy package and pumaGUI successfully installed."
echo -e "To use any of them, remember to first run 'conda activate puma'"
echo -e "It is recommended to open a new shell session in order for the changes to have effect."