-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·38 lines (26 loc) · 1.23 KB
/
setup.sh
File metadata and controls
executable file
·38 lines (26 loc) · 1.23 KB
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
#!/bin/bash
cd "$(dirname "$(realpath "$0")")"
####################################################################################################
echo 'Checking if all config files exist'
FILE=config/model.sav
if [ ! -f "$FILE" ]; then
echo "$FILE does not exist."
fi
FILE=config/scaler.pkl
if [ ! -f "$FILE" ]; then
echo "$FILE does not exist."
fi
####################################################################################################
echo 'Checking if conda is installed'
if ! conda info &> /dev/null
then
echo "Conda is not installed, installing it..."
curl -L "https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.sh" | tee conda_installer.sh | md5sum -c <(echo "751786b92c00b1aeae3f017b781018df -") && bash conda_installer.sh || rm -f conda_installer.sh
fi
####################################################################################################
echo 'Sourcing conda shell.bash hook'
eval "$(conda shell.bash hook)"
####################################################################################################
echo 'Creating conda environment'
conda env create -f python/environment.yml --force > /dev/null
conda env create -f python/environment2.yml --force > /dev/null