-
Notifications
You must be signed in to change notification settings - Fork 93
/
run_jupyter.sh
executable file
·45 lines (37 loc) · 1.82 KB
/
run_jupyter.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
#!/bin/bash
set -e
if ! gcc -v &> /dev/null
then
echo "Could not find gcc, please install it first"
exit 1
fi
if [ ! -f ./.installed ] | [ ! -d ./miniconda ]; then
if [ "$(uname)" == "Darwin" ]; then
if [ $(uname -m) == 'arm64' ]; then
curl -L https://repo.anaconda.com/miniconda/Miniconda3-py38_4.12.0-MacOSX-arm64.sh -o Miniconda3-py38_4.12.0-x86_64.sh
elif [ $(uname -m) == 'x86_64' ]; then
curl -L https://repo.anaconda.com/miniconda/Miniconda3-py38_4.12.0-MacOSX-x86_64.sh -o Miniconda3-py38_4.12.0-x86_64.sh
fi
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
curl -L https://repo.anaconda.com/miniconda/Miniconda3-py38_4.12.0-Linux-x86_64.sh -o Miniconda3-py38_4.12.0-x86_64.sh
fi
chmod u+x ./Miniconda3-py38_4.12.0-x86_64.sh && ./Miniconda3-py38_4.12.0-x86_64.sh -p miniconda -b && rm Miniconda3-py38_4.12.0-x86_64.sh
./miniconda/bin/conda install -y --no-deps pycryptosat libcryptominisat
./miniconda/bin/conda config --set sat_solver pycryptosat
./miniconda/bin/conda update conda -y -q
./miniconda/bin/conda create --prefix ./miniconda/envs/hopsworks python=3.8 -y
./miniconda/envs/hopsworks/bin/pip install jupyterlab==2.3.2 jupyter scikit-learn==1.0.2 matplotlib==3.5.2 seaborn==0.11.2 streamlit==1.11.0 plotly==5.9.0 xgboost tensorflow
# Installing hopsworks should be the last pip install
./miniconda/envs/hopsworks/bin/pip install hopsworks --no-cache-dir
touch ./.installed
fi
# Set environment variable for hopsworks.login()
if [ -f ./.hw_api_key ]; then
export HOPSWORKS_API_KEY=`cat ./.hw_api_key`
fi
if [ -f ./miniconda/envs/hopsworks/bin/jupyter ]; then
./miniconda/envs/hopsworks/bin/jupyter trust quickstart.ipynb
./miniconda/envs/hopsworks/bin/jupyter lab
else
./miniconda/envs/hopsworks/bin/jupyter-lab
fi