forked from vmware-archive/ipython-notebook-buildpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile
executable file
·27 lines (22 loc) · 836 Bytes
/
compile
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
#!/usr/bin/env bash
ROOT=$1
CACHE=$2
BASH=$(which bash)
CONDA_HOME="$1/.conda"
CONDA_BIN="$CONDA_HOME/bin"
MINICONDA_CACHE="$CACHE/miniconda.sh"
MINICONDA_URI='http://repo.continuum.io/miniconda/Miniconda3-2.0.3-MacOSX-x86_64.sh'
echo "-----> Preparing Python Environment..."
if [ ! -e $MINICONDA_CACHE ] ; then
wget -q -O $MINICONDA_CACHE $MINICONDA_URI
chmod +x $MINICONDA_CACHE
fi
if [ -e $CONDA_HOME ]; then rm -rf $CONDA_HOME; fi
$MINICONDA_CACHE -b -p $CONDA_HOME &> /dev/null
echo "-----> Installing Dependencies..."
$CONDA_BIN/conda update --yes --quiet conda &> /dev/null
$CONDA_BIN/conda install --yes --quiet ipython-notebook &> /dev/null
if [ -e "$ROOT/requirements.txt" ]; then
$CONDA_BIN/conda install --yes --quiet --file "$ROOT/requirements.txt" &> /dev/null
fi
grep -rlI $(pwd) . | xargs sed -ie "s|$(pwd)|.|g"