Recently, I've been completely immersed in machine learning, but using Jupyter Notebook is useful because it makes my studies easier. Since it can be used with a browser, I wanted an environment where I could open my "notebook" even if I didn't have my favorite laptop, anytime and anywhere with a browser.
Build a Jupyter Notebook environment with Docker on DigitalOcean To do.
DigitalOcean is a cheap so-called IaaS. It is charged on an hourly basis and can be used for 0.86 yen / hour ($ 0.007 / hour) as of November 21, 2015. If you turn off the server on the DigitalOcean web page, it will not cost you money, so you can turn it on only when you want to study.
Docker is a well-known container-type application deployment tool, which is used here to simplify the construction of the Jupyter Notebook environment. As a container, scikit-learn etc. is pre-installed here Container is used.
DigitalOcean builds a server in units called Droplets.
As a prerequisite, once you have created a DigitalOcean account, follow the this article to get your public key. I will register it.
Log in to DigitalOcean and click "Create Droplet"
Create a Droplet with the following content (Choose an image
selects Docker)
When the Droplet creation is completed, the IP address of the created Droplet will be displayed. Log in to Droplet with ssh from your PC.
$ ssh root@<IP address>
Create a workspace directory [^ 1]
$ mkdir /opt/notebooks #Location is arbitrary
$ chmod a+w -R /opt/notebooks
Start the Jupyter container that contains the packages required for machine learning such as scikit-learn
.
$ docker run -d --restart always -p 8888:8888 -v /opt/notebooks:/home/jovyan/work -e PASSWORD=<Any password> jupyter/datascience-notebook
Go to http: // <IP address>: 8888
in your browser to check
[^ 1]: I'm trying to manage / opt / notebooks
with git
After that, try using Jupyter Notebook as usual. When you're done, try "Power off" from the DigitalOcean Web. If you "Power on" later, Jupyter Notebook will start up automatically.
Once upon a time, I was wondering, "The ʻorg mode of ʻEmacs
is suitable for writing sentences, but is it something that can't easily execute program code or even reflect the results?" However, I think Jupyter Notebook is a tool that makes this possible. In that sense, I think that the current students are happy, and I think it would be good to actively introduce Jupyter Notebook at school these days.