Build a "Deep learning from scratch" learning environment on Cloud9 (jupyter miniconda python3)

I created a learning environment for Deep Learning (books) created from scratch on the cloud (Cloud9).

Install Anaconda (miniconda) and Jupyter on Cloud9. It's been a few years since I've been developing a program, and I'm surprised that I can now develop a program in the cloud. Anyway, I have almost no knowledge of cloud9, jupyter, and anaconda, and I struggled to install and operate the package from scratch.

environment

--Cloud9 paid version --miniconda (minimum configuration of anaconda) Reference: Site that describes anaconda and conda

Installation memo

The free version of cloud9 doesn't have enough disk space!

I thought Cloud9 was free, but every time I installed the tool, I ran out of space and 2G quickly reached 100%. Therefore, I had to use the paid version. It's $ 19 a month. It is safer to set the disk capacity to 15G.

I referred to here for the installation of miniconda and jupyter on cloud9.

Just enter the command below and enter your password! Thank you very much. http://qiita.com/y__sama/items/58419e85f39265fe6df8

git clone https://github.com/y-sama/cloud9.git


bash cloud9/init.sh (Basic "y" is fine when installation confirmation is given)

Mainly, it seems that Jupyter and python will be available. A jupyter password will be created during installation, so enter it appropriately.

Now restart the shell. jupyter3.png

Start jupyter

After the installation is complete, run jupyter notebook from the command line to start jupyter. ~~ After the installation is completed, run jupyter under cloud9 from jupyter and run jupyter. ~~ After that, when you access from the browser with /xxxx.username.c9users.io/tree# xxxx: workspace name, you will be asked to enter the password, so when you enter the password, the jupyter screen will be displayed.

numpy module load error

When I execute the following code with jupyter, an error occurs. The language of the project should be python3. cloud9-1.jpg

import numpy as np


Error details
ImportError Traceback (most recent call last) in () 1 import numpy as np ImportError: No module named 'numpy'import numpy as np


Action
The error is that the numpy module is missing. I searched variously and executed the following two commands to fix it.

Reference site http://qiita.com/y__sama/items/58419e85f39265fe6df8

――If you have miniconda instead of Anaconda, it's probably OK if you 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.

echo 'alias activate="source $PYENV_ROOT/versions/anaconda3-4.0.0/bin/activate"' >> ~/.bashrcsource ~/.bashrc
 conda install seaborn # anaconda is not included, so put it in `` `

 Now restart the shell again.

### Unable to read modules in chapter directory

 jupyter seems to be executed in the directory under jupyter. For example, in the case of Chapter 4, the module used in deep learning is under ch04, so it is necessary to pre-populate the path.

 <br> Error details <br>

ImportError Traceback (most recent call last) in () 3 import numpy as np 4 import matplotlib.pylab as plt ----> 5 from gradient_2d import numerical_gradient 6 7 ImportError: No module named 'gradient_2d'

 <br> Action <br>

import sys sys.path.append('/home/ubuntu/workspace/jupyter/ch04')###Enter the chapter directory path like this import numpy as np import matplotlib.pylab as plt from gradient_2d import numerical_gradient #If you do not enter the path, you will get an error if the module is not found here


### From dataset.mnist import load_mnist causes a module load error.
 --If you do not expand the book file (https://github.com/oreilly-japan/deep-learning-from-scratch) under jupyter, an error will occur when you import the module when you run the program on jupyter.
 Expand it under the jupyter folder as shown in the figure below.

 ![jupyter1.png](https://qiita-image-store.s3.amazonaws.com/0/188563/6d767cc6-6455-571d-ec15-ef755e6417be.png)

### Graph display on jupyter
 If jupyter works properly, the graph will be displayed as shown below.

 ![jupyter2.png](https://qiita-image-store.s3.amazonaws.com/0/188563/35777aa1-6d3a-c43f-7d3f-25f40c2bc670.png)






Recommended Posts

Build a "Deep learning from scratch" learning environment on Cloud9 (jupyter miniconda python3)
Build a Python + OpenCV environment on Cloud9
Build a machine learning Python environment on Mac OS
Build a python3 environment on CentOS7
Build a python machine learning study environment on macOS sierra
Build a python environment on MacOS (Catallina)
[Windows 10] "Deep Learning from scratch" environment construction
Deep Learning from scratch
Build a python environment with ansible on centos6
Build a Python environment on Mac (Mountain Lion)
Build a Python development environment on your Mac
Quickly build a python environment for deep learning and data science (Windows)
Python vs Ruby "Deep Learning from scratch" Summary
Build a Python machine learning environment with a container
Build a Python development environment on Raspberry Pi
From nothing on Ubuntu 18.04 to setting up a Deep Learning environment in Tensor
Build a python environment to learn the theory and implementation of deep learning
Build a GVim-based Python development environment on Windows 10 (3) GVim8.0 & Python3.6
# 2 Build a Python environment on AWS EC2 instance (ubuntu18.04)
Build a GVim-based Python development environment on Windows 10 (1) Installation
How to build a Django (python) environment on docker
Build a Python development environment on Mac OS X
Build a Python environment on your Mac using pyenv
Build a machine learning application development environment with Python
Build a Python development environment using pyenv on MacOS
How to build a Python environment on amazon linux 2
Create a machine learning environment from scratch with Winsows 10
Build a machine learning environment natively on Windows 10 (x64)
Deep Learning from scratch 1-3 chapters
Build Python environment on Windows
Build python environment on windows
Build a machine learning environment
Build a Python environment offline
Build a machine learning environment on mac (pyenv, deeplearning, opencv)
Build an environment for machine learning using Python on MacOSX
Try to build a deep learning / neural network with scratch
Building a Python environment on a Mac and using Jupyter lab
Create an environment for "Deep Learning from scratch" with Docker
(Now) Build a GPU Deep Learning environment with GeForce GTX 960
Build a python data analysis environment on Mac (El Capitan)
Build a Python environment with WSL + Pyenv + Jupyter + VS Code
Build a python environment on CentOS 7.7 for your home server
Building a Python environment on Mac
Building a Python environment on Ubuntu
Create a Python environment on Mac (2017/4)
Deep learning from scratch (cost calculation)
Create a python environment on centos
Deep Learning memos made from scratch
Build Python 3.8 + Pipenv environment on Ubuntu 18.04
Deep learning tutorial from environment construction
Build a 64-bit Python 2.7 environment with TDM-GCC and MinGW-w64 on Windows 7
Build a Python environment on your Mac with Anaconda and PyCharm
# 3 Build a Python (Django) environment on AWS EC2 instance (ubuntu18.04) part2
How to build a Python environment using Virtualenv on Ubuntu 18.04 LTS
Everything from building a Python environment to running it on Windows
Building a Python development environment on Windows -From installing Anaconda to linking Atom and Jupyter Notebook-
Build Jupyter Lab (Python) environment with Docker
Python 2.7, 3.4, 3.5 extension module build environment on Windows
[Learning memo] Deep Learning made from scratch [Chapter 7]
Deep learning from scratch (forward propagation edition)
Build Python3 and OpenCV environment on Ubuntu 18.04