By: Suresh in Python Tutorials on 2019年02月23日 [フレーム]
Jupyter Notebooks have become the defacto standard for data scientists to show case their research and machine learning algorithms and work for presentation and sharing with others. Here we can see how to make Jupyter Notebooks to be accessed over internet from our server.
As usual start with updating ubuntu repositories and upgrade to latest
sudo apt update sudo apt -y upgrade
If you have not installed python already, you install it now. Otherwise skip this part.
sudo apt-get install python3.6 sudo apt install -y python3-pip
Also install the necessary development tools
sudo apt install build-essential libssl-dev libffi-dev python3-dev
Create a virtual configuration in apache2 as below
ServerName jupyter.yourdomain.com ProxyPreserveHost On ProxyRequests off ProxyPass /api/kernels/ ws://localhost:8888/api/kernels/ ProxyPassReverse /api/kernels/ http://localhost:8888/api/kernels/ ProxyPass / http://localhost:8888/ ProxyPassReverse / http://localhost:8888/
In addition to enable apache reverse proxy, you also need to enable wstunnel
sudo a2enmod proxy sudo a2enmod proxy_http sudo a2enmod proxy_wstunnel sudo systemctl restart apache2
Now that you have restarted apache2, you can start jupyter to run in the background using screen
apt-get install screen screen -A -m -d -S jup jupyter notebook --allow-root --no-browser --NotebookApp.allow_remote_access=True
The switch --NotebookApp.allow_remote_access=True is important to allow the access of notebooks over internet. This will avoid errors such as this" Blocking request with non-local 'Host' jupyter.yourdomain.com. If the notebook should be accessible at that name, set NotebookApp.allow_remote_access to disable the check.
Also if you are not familiar with screen, you should probably google around to check how to use it. Some common commands are:
#to list all the screens screen -ls #to view the screen interface screen -r #to come out and detach from screen view ctrl + A and then D
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Most Viewed Articles (in Python )
Retrieve Twitter posts and comments using Python
Python program to get location meta data from an image
How to install Jupyter in Ubuntu and make it accessible through Apache Reverse Proxy
Installing gedit for python programming in Windows
Latest Articles (in Python)
Python program to get location meta data from an image
Retrieve Twitter posts and comments using Python
How to install Jupyter in Ubuntu and make it accessible through Apache Reverse Proxy
Python Basics - Setting up your Python Development Environment
Schwartzian Transform in python
Multidimensional list (array) in python
Perl's chomp() equivalent for removing trailing newlines from strings in python
Python program to get location meta data from an image
Retrieve Twitter posts and comments using Python
How to install Jupyter in Ubuntu and make it accessible through Apache Reverse Proxy
Python Basics - Setting up your Python Development Environment
Schwartzian Transform in python
Multidimensional list (array) in python
Perl's chomp() equivalent for removing trailing newlines from strings in python
© 2023 Java-samples.com
Tutorial Archive: Data Science React Native Android AJAX ASP.net C C++ C# Cocoa Cloud Computing EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Trends WebServices XML Office 365 Hibernate
Latest Tutorials on: Data Science React Native Android AJAX ASP.net C Cocoa C++ C# EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Cloud Computing WebServices XML Office 365 Hibernate