forked from spacetelescope/jwst_validation_notebooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_environment.sh
executable file
·33 lines (31 loc) · 1.42 KB
/
setup_environment.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
export env_name="jwst_validation_notebooks"
export TEST_BIGDATA="https://bytesalad.stsci.edu/artifactory"
export CRDS_SERVER_URL="https://jwst-crds.stsci.edu"
export CRDS_PATH="/grp/crds/cache"
export WIT4_PATH="/grp/jwst/wit4"
export PIPELINE_VERSION=$(<pipeline_version.txt)
case `uname` in
Darwin)
if ! command -v conda &> /dev/null
then
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o installer.sh
./installer.sh -b -p ./miniconda3_tmp
conda init zsh
fi
conda create -n ${env_name} --file https://ssb.stsci.edu/releases/jwstdp/${PIPELINE_VERSION}/conda_python_macos-stable-deps.txt
conda activate ${env_name}
pip install -r https://ssb.stsci.edu/releases/jwstdp/${PIPELINE_VERSION}/reqs_macos-stable-deps.txt
;;
Linux)
if ! command -v conda &> /dev/null
then
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o installer.sh
./installer.sh -b -p ./miniconda3_tmp
conda init zsh
fi
conda create -n ${env_name} --file https://ssb.stsci.edu/releases/jwstdp/${PIPELINE_VERSION}/conda_python_stable-deps.txt
conda activate ${env_name}
pip install -r https://ssb.stsci.edu/releases/jwstdp/${PIPELINE_VERSION}/reqs_stable-deps.txt
;;
esac
conda env update --name ${env_name} --file notebook_supplement.yml --prune