-
Notifications
You must be signed in to change notification settings - Fork 6
/
make_env.bash
executable file
·54 lines (45 loc) · 1.6 KB
/
make_env.bash
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
#!/usr/bin/env bash
export RELEASE="v82"
export PREPEND_CHANNEL="-c cdat/label/test"
export PREPEND_CHANNEL=""
export APPEND_CHANNEL=""
#export ACTIVATE_COMMAND="conda"
export ACTIVATE_COMMAND="source"
export CREATE="y"
echo "ACTIVATE COMMAND: ${ACTIVATE_COMMAND}"
#export CONDA_BASE=$(conda info --base)
#echo "CONDA_BASE: $CONDA_BASE"
${ACTIVATE_COMMAND} deactivate
${ACTIVATE_COMMAND} activate base
conda config --add channels conda-forge
conda config --set channel_priority strict
#source $CONDA_BASE/etc/profile.d/conda.sh
for PYVER in 2.7 3.6 3.7
do
if [ $PYVER == "2.7" ]; then
PYVER_STR = "python<3"
elif [ $PYVER == "3.6" ]; then
PYVER_STR = "python>=3.6,<3.7"
else
PYVER_STR = "python>=3.7"
fi
for MESA in y n
do
if [ $MESA == "y" ]; then
export MESA_NAME="-nox"
export MESA_PKG="mesalib"
else
export MESA_NAME=""
export MESA_PKG=""
fi
echo "Doing version $PYVER with mesalib set to $MESA"
if [ ${CREATE} == "y" ]; then
conda create -y -n cdat-${RELEASE}${MESA_NAME}_py$PYVER ${PREPEND_CHANNEL} -c conda-forge -c cdat/label/${RELEASE} ${APPEND_CHANNEL} cdat python=$PYVER ${MESA_PKG}
fi
${ACTIVATE_COMMAND} activate cdat-${RELEASE}${MESA_NAME}_py$PYVER
echo $(conda list vtk)
conda env export --no-builds > cdat-${RELEASE}${MESA_NAME}_py$PYVER.$(uname).yaml
${ACTIVATE_COMMAND} deactivate
${ACTIVATE_COMMAND} activate base
done
done