Last active
February 15, 2021 23:09
-
-
Save sean-smith/f6bd44f0f9eb785e944e7fd999d7b076 to your computer and use it in GitHub Desktop.
Revisions
-
sean-smith revised this gist
Apr 2, 2017 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -61,6 +61,18 @@ c.NotebookApp.password = u'sha1:bcd259ccf...<put output from above here>' c.NotebookApp.open_browser = False c.NotebookApp.port = 443 ``` ### Run iPython in background ```bash sudo su jupyter notebook &> /dev/null & ``` Now you can connect to the url: `https://ec2-54-148-64-44.us-west-2.compute.amazonaws.com/` If you have a self signed certificate you'll get a warning that your connection is unsafe. Click `advanced` and then `proceed anyways`. You'll then be prompted for the password you set in the `Configure iPython and get Password` step. Enter that and click continue. Now you have an iPython notebook running on AWS! 🤓 # References * http://jupyter-notebook.readthedocs.io/en/latest/public_server.html -
sean-smith revised this gist
Apr 2, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ # Setup an iPython Notebook on AWS with LetsEncrypt Certificate The first step is to setup an EC2 `Ubuntu 16.04` instance that you can ssh into. I won't go into detail here but you should be able to easily google it. -
sean-smith revised this gist
Apr 2, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # Setup an iPython Notebook on AWS with LetsEncrypt Certificate: The first step is to setup an EC2 `Ubuntu 16.04` instance that you can ssh into. I won't go into detail here but you should be able to easily google it. You can get free AWS credit here https://education.github.com/pack -
sean-smith revised this gist
Apr 2, 2017 . 1 changed file with 21 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,14 @@ # Setup a EC2 instance running `Ubuntu 16.04`: The first step is to setup an EC2 Ubuntu instance that you can ssh into. I won't go into detail here but you should be able to easily google it. You can get free AWS credit here https://education.github.com/pack A better guide w/ pictures is here: https://chrisalbon.com/jupyter/run_project_jupyter_on_amazon_ec2.html (Note this doesn't include LetsEncrypt, so it only has self signed certificates) Once you've setup an instance and ssh'd in, do the following: ### Install Anaconda: ```bash @@ -10,8 +18,9 @@ wget https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh bash Anaconda3-4.3.1-Linux-x86_64.sh . ~/.bashrc ``` If you have your own domain you can link it so you don't have type in the IP address each time you want to access your notebook. ### Install Certbot (if you have your own domain) ```bash sudo add-apt-repository ppa:certbot/certbot sudo apt-get update @@ -24,14 +33,24 @@ mkdir -p /root/.key certbot certonly --webroot /root/.key -d YOURDOMAIN.com ``` If you don't have your own domain, create a self signed certificate. ### Self Signed Certificate ``` mkdir -p /root/certs cd /root/certs sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout privkey.pem -out cert.pem ``` ### Configure iPython and get Password ```bash cd ~ jupyter notebook --generate-config # Create jupyter config printf "from notebook.auth import passwd\nprint(passwd())" | python ``` Enter your password and confirm. Copy the result as we'll use it in the next step. ### Edit ~/.jupyter/jupyter_notebook_config.py ```python # Set options for certfile, ip, password, and toggle off -
sean-smith revised this gist
Mar 29, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -45,4 +45,5 @@ c.NotebookApp.port = 443 # References * http://jupyter-notebook.readthedocs.io/en/latest/public_server.html * https://certbot.eff.org/#ubuntuxenial-other * https://gist.github.com/iamatypeofwalrus/5183133 -
sean-smith revised this gist
Mar 29, 2017 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -41,4 +41,8 @@ c.NotebookApp.ip = '0.0.0.0' c.NotebookApp.password = u'sha1:bcd259ccf...<put output from above here>' c.NotebookApp.open_browser = False c.NotebookApp.port = 443 ``` # References * http://jupyter-notebook.readthedocs.io/en/latest/public_server.html * https://certbot.eff.org/#ubuntuxenial-other -
sean-smith revised this gist
Mar 29, 2017 . No changes.There are no files selected for viewing
-
sean-smith revised this gist
Mar 29, 2017 . 1 changed file with 14 additions and 15 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # Setup a EC2 instance running `Ubuntu 16.04`: ### Install Anaconda: ```bash sudo su @@ -11,35 +11,34 @@ bash Anaconda3-4.3.1-Linux-x86_64.sh . ~/.bashrc ``` ### Install Certbot ```bash sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install certbot ``` ### Get Certificate ```bash mkdir -p /root/.key certbot certonly --webroot /root/.key -d YOURDOMAIN.com ``` ### Configure iPython and get Password ```bash cd ~ jupyter notebook --generate-config # Create jupyter config printf "from notebook.auth import passwd\nprint(passwd())" | python ``` ### Edit .jupyter/jupyter_notebook_config.py ```python # Set options for certfile, ip, password, and toggle off c.NotebookApp.certfile = u'/root/.key/cert.pem' c.NotebookApp.keyfile = u'/root/.key/privkey.pem' c.NotebookApp.ip = '0.0.0.0' c.NotebookApp.password = u'sha1:bcd259ccf...<put output from above here>' c.NotebookApp.open_browser = False c.NotebookApp.port = 443 ``` -
sean-smith revised this gist
Mar 29, 2017 . 1 changed file with 22 additions and 22 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,38 +3,38 @@ Setup a EC2 instance running `Ubuntu 16.04`: # Install Anaconda: ```bash sudo su cd ~ wget https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh bash Anaconda3-4.3.1-Linux-x86_64.sh . ~/.bashrc ``` # Install Certbot ```bash sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install certbot ``` # Get Certificate ```bash mkdir -p /root/.key certbot certonly --webroot /root/.key -d YOURDOMAIN.com ``` # Configure iPython ```bash cd ~ jupyter notebook --generate-config # Create jupyter config printf "from notebook.auth import passwd\nprint(passwd())" | python ``` # Edit .jupyter/jupyter_notebook_config.py ```python # Set options for certfile, ip, password, and toggle off # browser auto-opening\n c.NotebookApp.certfile = u'/root/.key/cert.pem'\n c.NotebookApp.keyfile = u'/root/.key/privkey.pem' # Set ip to '*' to bind on all interfaces (ips) for the public server c.NotebookApp.ip = '*' c.NotebookApp.password = u'sha1:bcd259ccf...<your hashed password here>' -
sean-smith revised this gist
Mar 29, 2017 . 1 changed file with 11 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,31 +3,34 @@ Setup a EC2 instance running `Ubuntu 16.04`: # Install Anaconda: ``` sudo su cd ~ wget https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh bash Anaconda3-4.3.1-Linux-x86_64.sh . ~/.bashrc ``` # Install Certbot ``` sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install certbot ``` # Get Certificate ``` mkdir -p /root/.key certbot certonly --webroot /root/.key ``` # Configure iPython ``` cd ~ jupyter notebook --generate-config # Create jupyter config printf "from notebook.auth import passwd\nprint(passwd())" | python ``` # Edit .jupyter/jupyter_notebook_config.py ``` # Set options for certfile, ip, password, and toggle off\n # browser auto-opening\n c.NotebookApp.certfile = u'/root/.key/cert.pem'\n @@ -38,4 +41,5 @@ Setup a EC2 instance running `Ubuntu 16.04`: c.NotebookApp.open_browser = False # It is a good idea to set a known, fixed port for server access c.NotebookApp.port = 9999" >> .jupyter/jupyter_notebook_config.py ``` -
sean-smith revised this gist
Mar 29, 2017 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,27 +2,32 @@ Setup a EC2 instance running `Ubuntu 16.04`: # Install Anaconda: sudo su cd ~ wget https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh bash Anaconda3-4.3.1-Linux-x86_64.sh . ~/.bashrc # Install Certbot sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install certbot # Get Certificate mkdir -p /root/.key certbot certonly --webroot /root/.key # Configure iPython cd ~ jupyter notebook --generate-config # Create jupyter config printf "from notebook.auth import passwd\nprint(passwd())" | python # Edit .jupyter/jupyter_notebook_config.py # Set options for certfile, ip, password, and toggle off\n # browser auto-opening\n c.NotebookApp.certfile = u'/root/.key/cert.pem'\n -
sean-smith renamed this gist
Mar 29, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
sean-smith created this gist
Mar 29, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ Setup a EC2 instance running `Ubuntu 16.04`: # Install Anaconda: sudo su cd ~ wget https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh bash Anaconda3-4.3.1-Linux-x86_64.sh . ~/.bashrc # Install Certbot sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install certbot # Get Certificate mkdir -p /root/.key certbot certonly --webroot /root/.key # Configure iPython cd ~ jupyter notebook --generate-config # Create jupyter config printf "from notebook.auth import passwd\nprint(passwd())" | python # Edit .jupyter/jupyter_notebook_config.py # Set options for certfile, ip, password, and toggle off\n # browser auto-opening\n c.NotebookApp.certfile = u'/root/.key/cert.pem'\n c.NotebookApp.keyfile = u'/root/.key/privkey.pem' # Set ip to '*' to bind on all interfaces (ips) for the public server c.NotebookApp.ip = '*' c.NotebookApp.password = u'sha1:bcd259ccf...<your hashed password here>' c.NotebookApp.open_browser = False # It is a good idea to set a known, fixed port for server access c.NotebookApp.port = 9999" >> .jupyter/jupyter_notebook_config.py