-
Notifications
You must be signed in to change notification settings - Fork 21
/
install_38.sh
executable file
·46 lines (43 loc) · 1.76 KB
/
install_38.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
#!/bin/bash
echo "Pulling submodules"
bash pull_submodules.sh
echo "Installing mamba"
conda install mamba -n base -c conda-forge
if ! command -v mamba &> /dev/null
then
echo "mamba could not be found. Please install mamba before running this script"
exit
fi
echo "Creating conda environment"
mamba create -n work38 python=3.8
eval "$(conda shell.bash hook)" # make sure conda works in the shell script
conda activate work38
if echo $CONDA_PREFIX | grep work38
then
echo "Conda environment successfully activated"
else
echo "Conda environment not activated. Probably it was not created successfully for some reason. Please activate the conda environment before running this script"
exit
fi
echo "Installing conda packages"
# mamba env update -n work38 --file conda-environment_py38_cu11_ubuntu.yml
mamba env update -n work38 --file conda-environment_py38_cu11.yaml
echo "Installing other requirements"
pip install -r requirements38.txt
pip install Cython==0.29
echo "Making sure Pytorch3D installed correctly"
pip install git+https://github.com/facebookresearch/[email protected]
echo "Installing INFERNO"
pip install -e .
# Insightface has problems with downloading some of their models
echo -e "\nDownloading insightface models..."
mkdir -p ~/.insightface/models/
if [ ! -d ~/.insightface/models/antelopev2 ]; then
wget -O ~/.insightface/models/antelopev2.zip "https://keeper.mpdl.mpg.de/f/2d58b7fed5a74cb5be83/?dl=1"
unzip ~/.insightface/models/antelopev2.zip -d ~/.insightface/models/antelopev2
fi
if [ ! -d ~/.insightface/models/buffalo_l ]; then
wget -O ~/.insightface/models/buffalo_l.zip "https://keeper.mpdl.mpg.de/f/8faabd353cfc457fa5c5/?dl=1"
unzip ~/.insightface/models/buffalo_l.zip -d ~/.insightface/models/buffalo_l
fi
echo "Installation finished"