I made a super easy version. https://github.com/y-sama/cloud9 Mainly, Jupyter, Pandas, Scikit-learn, tensorflow can be used.
git clone https://github.com/y-sama/cloud9.git
bash cloud9/init.sh
Introduction
Recently, I heard that you can put Jupyter on the online IDE Cloud9 somewhere. There is a preceding article, but I will reorganize it for myself.
I think it takes less than 10 minutes for the fastest setting to ignore security, and less than 30 minutes for various settings. The free DISK that can be used with Cloud9 is 2GB, but I use about 1.6GB. Unfortunately, Tensorflow cannot be installed because it consumes disk space. Also, since it is a single core, I can not do serious calculations, but if you are interested in Jupyter, want to try pandas, or want to do a scikit-learn tutorial, it is enough.
All you need is your email address. https://c9.io/signup
All you have to do is enter your name.
So far ** 1 minute **
Create a suitable workspace. For the time being, the Private setting and Template are set to python, but anything is fine. It takes a while for the virtual machine to start up.
So far ** three minutes **
When the workspace screen comes up, there is a bash console at the bottom of the screen, so copy and paste the following Script.
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
source ~/.bashrc
pyenv install anaconda3-4.0.0
pyenv rehash
pyenv global anaconda3-4.0.0
Anaconda will be downloaded, but it will take about 3 minutes.
Up to here ** 6 minutes **
jupyter notebook --ip 0.0.0.0 --port 8080 --no-browser
Security is super sweet, but for the time being, it works.
https://<workspace>.<username>.c9users.io
You can access Jupyter from. Since it is https, be careful only there.
Up to here ** 7 minutes ** At the fastest, you can prepare the environment in less than 10 minutes: laughing:
If you have miniconda instead of Anaconda, you can probably add this much.
conda install jupyter scikit-learn bokeh seaborn pandas dask networkx numba pep8 pillow scikit-image sqlalchemy sqlite statsmodels sympy xlrd xlsxwriter xlwt
You should set this much around Anaconda.
conda update conda #The version of conda goes up often, so check it for the time being
echo 'alias activate="source $PYENV_ROOT/versions/anaconda3-4.0.0/bin/activate"' >> ~/.bashrc
source ~/.bashrc
conda install seaborn #It's not in anaconda so I'll put it in
** Cloud9 can be accessed from anywhere, so it is better to set a password. ** **
--Create a config file --Generate a hash string for the password when accessing Jupyter.
mkdir ~/workspace/jupyter
jupyter notebook --generate-config
#>>> Writing default config to: /home/ubuntu/.jupyter/jupyter_notebook_config.py
python -c "from notebook.auth import passwd;print(passwd())"
#>>> Enter password: #Enter the password to use when accessing Jupyter
#>>> Verify password:
#>>> 'sha1:......' #Copy after sha
--Edit jupyter_notebook_config.py.
vi ~/.jupyter/jupyter_notebook_config.py
changes | initial value | After change |
---|---|---|
c.NotebookApp.ip | 'localhost' | '*' |
c.NotebookApp.notebook_dir | null | '/home/ubuntu/workspace/jupyter' |
c.NotebookApp.open_browser | True | False |
c.NotebookApp.port | 8888 | 8080 |
c.NotebookApp.password | null | 'sha1:......' #The hash string from earlier |
This is also weak in terms of security, so if you want to keep Jupyter running all the time, limit your IP address.
If you place .py or .ipy in ~ / .ipython / profile_default / startup
, it will be loaded when Ipython kernel starts.
If you put a file like 00_start.ipy
, it's easy because you don't have to type it each time you start Jupyter. The .ipy format can also write ipython magic commands.
00_start.ipy
import os,sys
import numpy as np
import pandas as pd
import seaborn as sns
%matplotlib inline
Assorted IPython extensions, extension RISE for presentation, document search jupyter_cms in Jupyter are included.
cd ~/
git clone https://github.com/ipython-contrib/IPython-notebook-extensions
cd IPython-notebook-extensions
python setup.py install
cd ../
git clone https://github.com/damianavila/RISE
cd RISE
python setup.py install
pip install jupyter_cms
jupyter cms quick-setup --sys-prefix
[Qiita article] of IPython-notebook-extensions (http://qiita.com/sasaki77/items/30a19d2be7d94116b237) Drag & Drop is convenient.
jupyter notebook
If you save the file with jupyter.sh and run it once, it will be easier because you can start it with one last run from the next time onwards.
Put it in Jupyter with https: // <workspace>. <Username> .c9users.io
.
It's the best toy.
Recommended Posts