-
-
Save thoo/a87d5b5a894440a456290b15d1cb9cfb to your computer and use it in GitHub Desktop.
Deploy Jupyter Notebook server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd ~ | |
wget http://repo.continuum.io/archive/Anaconda3-4.0.0-Linux-x86_64.sh | |
bash Anaconda3-4.0.0-Linux-x86_64.sh -b | |
echo 'PATH="/home/ubuntu/anaconda3/bin:$PATH"' >> .bashrc | |
source ~/.bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd ~ | |
tmux new -s nb | |
mkdir notebook | |
cd notebook | |
jupyter notebook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
jupyter notebook --generate-config | |
key=$(python -c "from notebook.auth import passwd; print(passwd())") | |
cd ~ | |
mkdir certs | |
cd certs | |
certdir=$(pwd) | |
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.key -out mycert.pem | |
cd ~ | |
sed -i "1 a\ | |
c = get_config()\\ | |
c.NotebookApp.certfile = u'$certdir/mycert.pem'\\ | |
c.NotebookApp.keyfile = u'$certdir/mycert.key'\\ | |
c.NotebookApp.ip = '*'\\ | |
c.NotebookApp.open_browser = False\\ | |
c.NotebookApp.password = u'$key'\\ | |
c.NotebookApp.port = 8888" .jupyter/jupyter_notebook_config.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo apt-get update && sudo apt-get -y upgrade #http://askubuntu.com/questions/118025/bypass-the-yes-no-prompt-in-apt-get-upgrade | |
sudo apt-get -y install g++ #http://superuser.com/questions/164553/automatically-answer-yes-when-using-apt-get-install | |
sudo apt-get -y install git | |
sudo apt-get -y install make | |
sudo apt-get -y install gcc | |
sudo apt-get -y install python-setuptools | |
git clone --recursive https://github.com/dmlc/xgboost | |
cd xgboost; make -j4 | |
cd python-package; sudo /home/ubuntu/anaconda3/bin/python setup.py install | |
var=$(pwd) | |
echo 'export PYTHONPATH='$var >> ~/.bashrc | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment