Krishna Rungta - TensorFlow in 1 Day Make Your Own Neural Network (2018) - Trang-7
Krishna Rungta - TensorFlow in 1 Day Make Your Own Neural Network (2018) - Trang-7
Step 4) Copy and paste it into the folder key. We will need it soon.
This step concerns only Mac OS user. For Windows or Linux users, please
proceed to PART 2
You need to set a working directory that will contain the file key
First of all, create a folder named key. For us, it is located inside the main folder
Docker. Then, you set this path as your working directory
mkdir Docker/key
cd Docker/key
PART 2: Set up a security group
Step 1) You need to configure a security group. You can access it with the panel
3. Click Create
Step 4) The newly created Security Group will be listed
The default server is enough for your need. You can choose Amazon Linux
AMI. The current instance is 2018.03.0.
AMI stands for Amazon Machine Image. It contains the information required to
successfully starts an instance that run on a virtual server stored in the cloud.
Note that AWS has a server dedicated to deep learning such as:
All of them Comes with latest binaries of deep learning frameworks pre-installed
in separate virtual environments:
TensorFlow,
Caffe
PyTorch,
Keras,
Theano
CNTK.
Fully-configured with NVidia CUDA, cuDNN and NCCL as well as Intel MKL-
DNN
Step 2) Choose t2.micro. It is a free tier server. AWS offers for free this virtual
machine equipped with 1 vCPU and 1 GB of memory. This server provides a
good tradeoff between computation, memory and network performance. It fits
for small and medium database
Step 3) Keep settings default in next screen and click Next: Add Storage
Step 6) Choose the security group you created before, which is jupyter_docker
At first make sure that inside the terminal, your working directory points to the
folder with the key pair file docker
There are two codes. in some case, the first code avoids Jupyter to open the
notebook.
Now that both software are installed, you need to convert the .pem file to .ppk.
PuTTY can only read .ppk. The pem file contains the unique key created by
AWS.
Step 2) Open PuTTYgen and click on Load. Browse the folder where the .pem
file is located.
Step 3)After you loaded the file, you should get a notice informing you that the
key has been successfully imported. Click on OK
Step 4) Then click on Save private key. You are asked if you want to save this
key without a passphrase. Click on yes.
Step 5) Save the Key
Step 6) Go to AWS and copy the public DNS
Open PuTTY and paste the Public DNS in the Host Name
Step 7)
When this step is done, a new window will be opened. Click Yes if you see this
pop-up
Step 9)
Step 10)
## Tensorflow
docker run -v ~/work:/home/jovyan/work -d -p 8888:8888
jupyter/tensorflow-notebook
## Sparkdocker
run -v ~/work:/home/jovyan/work -d -p 8888:8888 jupyter/pyspark-
notebook
Code Explanation
Step 3)
1. Check the container and its name (changes with every installation) Use
command
docker ps
2. Get the name and use the log to open Jupyter. In the tutorial, the container's
name is vigilant_easley. Use command
docker logs vigilant_easley
Step 4)
In the URL
http://(90a3c09282d6 or 127.0.0.1):8888/?
token=f460f1e79ab74c382b19f90fe3fd55f9f99c5222365eceed
http://ec2-174-129-135-16.compute-1.amazonaws.com:8888/?
token=f460f1e79ab74c382b19f90fe3fd55f9f99c5222365eceed
Step 6) Copy and paste the URL into your browser. Jupyter Opens
Step 7)
You can write a new Notebook in the work folder
Part 6: Close connection
Close the connection in the terminal
exit
Troubleshooting