forked from mosco/crossing-probability
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
31 lines (24 loc) · 675 Bytes
/
Copy pathbuild.sh
File metadata and controls
31 lines (24 loc) · 675 Bytes
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
#!/usr/bin/env bash
set -ex
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
ENVNAME=crossing
ENVFILE="$SCRIPT_DIR/env.yml"
eval "$(conda shell.bash hook)"
MANAGER="conda"
if ! [[ -z "${CONDA_CACHE}" ]]; then
mkdir -p "${CONDA_CACHE}/pkg" "${CONDA_CACHE}/envs"
conda config --add pkgs_dirs "${CONDA_CACHE}/pkg"
fi
if [ -x "$(command -v mamba)" ]; then
MANAGER="mamba"
fi
if conda env list | grep "${ENVNAME}"; then
# $MANAGER env update -f $ENVFILE -n $ENVNAME --prune
echo "Already exists..."
else
$MANAGER env create -f $ENVFILE -n $ENVNAME
fi
conda activate $ENVNAME
make
make python
python setup.py install