-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbuild_elm_env.sh
executable file
·53 lines (44 loc) · 1.72 KB
/
build_elm_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
45
46
47
48
49
50
51
52
53
#!/bin/bash
set -e
export ELM_BUILD_DIR=`pwd -P`
export EARTHIO_VERSION="${EARTHIO_VERSION:-master}"
if [ \( "$EARTHIO_INSTALL_METHOD" = "conda" \) -o \( "$EARTHIO_INSTALL_METHOD" = "git" \) ]; then
rm -rf .earthio_tmp
git clone http://github.com/ContinuumIO/earthio .earthio_tmp
cd .earthio_tmp
git fetch --all
echo git checkout $EARTHIO_VERSION
git checkout $EARTHIO_VERSION
set +e
IGNORE_ELM_DATA_DOWNLOAD=1 . build_earthio_env.sh
set -e
else
if [ ! -d "$HOME/miniconda" ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
fi
export PATH="$HOME/miniconda/bin:$PATH"
source deactivate
conda config --set always_yes true
conda config --set anaconda_upload no
conda install -n root conda conda-build
# Create $EARTHIO_TEST_ENV
conda env remove -n $EARTHIO_TEST_ENV || true
conda create -n $EARTHIO_TEST_ENV $EARTHIO_CHANNEL_STR -c elm -y python=$PYTHON numpy=$NUMPY earthio
# Add earthio package to index
mkdir -p ~/miniconda/conda-bld/linux-64/
cp -av ~/miniconda/pkgs/earthio*.tar.bz2 ~/miniconda/conda-bld/linux-64/
cd ~/miniconda/conda-bld
conda index
cd -
fi
conda remove -n root elm &> /dev/null || true
pip uninstall -y elm &> /dev/null || true
cd $ELM_BUILD_DIR
conda build $EARTHIO_CHANNEL_STR --python $PYTHON --numpy $NUMPY conda.recipe
conda install -n $EARTHIO_TEST_ENV $EARTHIO_CHANNEL_STR --use-local python=$PYTHON numpy=$NUMPY elm
for repo in "dask-glm" "dask-searchcv";do
# TODO improve with packaging later for ^^ dask packages
git clone "https://github.com/dask/${repo}" && cd $repo && python setup.py install;
done
set +e