-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathactivate_conda_env.sh
executable file
·44 lines (29 loc) · 1.28 KB
/
activate_conda_env.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
#!/bin/bash
project_path=${HOME}/Desktop/vmreact
env_path="${project_path}/pre-requirements/vmreact_miniconda2/envs/vmreact"
#rename vmreact-master to vmreact
echo "renaming vmreact-master to vmreact"
mv "${HOME}/Desktop/vmreact-master" "${HOME}/Desktop/vmreact";
#install miniconda in the pre-requirements dir
echo "Installing miniconda2 in the pre-requirements folder....";
bash ${project_path}/pre-requirements/Miniconda2-latest-MacOSX-x86_64.sh -b -p ${project_path}/pre-requirements/vmreact_miniconda2;
#add conda executables to path
export PATH=$PATH:${project_path}/pre-requirements/vmreact_miniconda2/bin/
#verify installation
echo "verification of conda installation....."
conda info;
#update
# conda update conda;
#create vmreact env
echo "creating vmreact conda environment...."
conda env create --file ${project_path}/pre-requirements/vmreact_miniconda_env.yaml -p ${project_path}/pre-requirements/vmreact_miniconda2/envs/vmreact;
#conda config
# touch ${env_path}/.condarc;
# cat `echo {project_path}/pre-requirements/.condarc` > ${env_path}/.condarc;
echo "source activate ${env_path}" >> ~/.bashrc
echo "source ~/.bashrc" >> ~/.bash_profile
source ~/.bash_profile;
echo "running setup.py for installation....."
python setup.py install;
#activate env
source activate ${env_path};