Page 1
Open SourceArtificial Intelligence
Tensorflow
Lablup Inc.
Mario (manseok) Cho
[email protected]
Page 2
Mario (manseok) Cho
Development Experience◆ Image Recognition using Neural Network◆ Bio-Medical Data Processing◆ Human Brain Mapping on High Performance Computing◆ Medical Image Reconstruction(Computer Tomography) ◆ Enterprise System Architect ◆ Artificial Intelligence for medicine decision support
◆Open Source Software Developer◆ Committer: (Cloud NFV/SDN)
◆ Contribute: ◆TensorFlow (Deep Learning)◆OpenStack (Cloud compute)◆LLVM (compiler)◆Kernel (Linux)
Book◆ Unix V6 Kernel
Lablup Inc.Mario Cho
[email protected]
Page 3
I. Setup Virtual Environment
•Virtual Box 5.1 Download & install.•https://www.virtualbox.org
Page 4
I. Setup Virtual Environment
• VirtualBox 5.1.22 for Windows hosts x86/amd64• VirtualBox 5.1.22 for OS X hosts amd64
Page 5
II. Operating System: download
•http://releases.ubuntu.com/•http://releases.ubuntu.com/xenial/
Page 6
II. Operating System: download• https://launchpad.net/ubuntu/+mirror/ftp.daum.net-release
Page 7
II. Operating System: virtual box setup
Page 8
II. Operating System: virtual box setup
Page 9
II. Operating System: virtual box setup
Page 10
II. Operating System: virtual box setup
Page 11
II. Operating System: virtual box setup
Page 12
II. Operating System: virtual box setup
Page 13
III. Operating System: VM Storage Setting
Page 14
III. Operating System: VM Storage Setting
Page 15
III. Operating System: VM Storage Setting
Page 16
III. Operating System: VM Network Setting
Page 17
III. Operating System: VM Network Setting
Page 18
III. Operating System: VM Network Setting
Page 19
III. Operating System: VM Network Setting
Page 20
III. Operating System: VM Network Setting
Page 21
III. Operating System: VM Network Setting
Page 22
III. Operating System: ready to install
Page 23
iV. Ubuntu: install
Page 24
iV. Ubuntu: install
Page 25
iV. Ubuntu: install
Page 26
iV. Ubuntu: install
Page 27
iV. Ubuntu: install
Page 28
iV. Ubuntu: install
Page 29
iV. Ubuntu: install
Page 30
iV. Ubuntu: install
Page 31
iV. Ubuntu: install
Page 32
iV. Ubuntu: install
Page 33
iV. Ubuntu: install
Page 34
iV. Ubuntu: install
Page 35
iV. Ubuntu: install
Page 36
iV. Ubuntu: install
Page 37
iV. Ubuntu: install
Page 38
iV. Ubuntu: install
Page 39
iV. Ubuntu: install
Page 40
iV. Ubuntu: install
Page 41
iV. Ubuntu: install
Page 42
iV. Ubuntu: install
Page 43
iV. Ubuntu: install
Page 44
iV. Ubuntu: install
Page 45
iV. Ubuntu: install
Page 46
iV. Ubuntu: install complete
Page 47
V. Ubuntu: Network setting• Login 창에 ID와 Password 를입력합니다.
• Ubuntu 16.04.03 LTS ubuntu tty1
• ubuntu login: ubuntu <-설치할때만들었던사용자아이디
• Password: ubuntu <-설치할때입력했던패스워드
• Pa
Page 48
V. Ubuntu: Network setting• $ sudo su -
• # echo 'auto enp0s8' >> /etc/network/interfaces
• # echo 'iface enp0s8 inet static' >> /etc/network/interfaces
• # echo 'address 192.168.56.10' >> /etc/network/interfaces
• # echo 'netmask 255.255.255.0' >> /etc/network/interfaces
Page 49
V. Ubuntu: Network setting• 설치를안했을경우새로설치
• $ sudo apt-get install openssh-server
• 검증 verify
• $ sudo service ssh status
Page 50
V. Ubuntu: reboot• $ sudo reboot
Page 51
V. Ubuntu: terminal Install• http://www.putty.org에접속해서
Page 52
V. Ubuntu: terminal Install• http://www.putty.org에접속해서 64bit 버전을다운받자.
Page 53
V. Ubuntu: terminal Install
Page 54
V. Ubuntu: terminal Install
Page 55
V. Ubuntu: terminal Install
Page 56
VI. Open local terminal using putty or term• Windows 환경: putty 를설치하고,창을열어 192.168.56.10 으로접속하자.
• OSX 환경:터미널을열어 $ ssh 192.168.56.10 –l ubuntu로접속하자.
Page 57
Vi. Repository Update & Upgrade• $ sudo apt-get -y update && sudo apt-get -y dist-upgrade
Page 58
Vi. Install librarys• $ sudo apt-get install -y make build-essential• $ sudo apt-get install -y libssl-dev zlib1g-dev libbz2-dev• $ sudo apt-get install -y libreadline-dev libsqlite3-dev wget• $ sudo apt-get install -y curl llvm libncurses5-dev• $ sudo apt-get install -y libncursesw5-dev xz-utils tk-dev
Page 59
Vii. Install pyenv• $ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
• $ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
• $ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
• $ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
• $ source ~/.bash_profile
• $ exec $SHELL -l
Page 60
Vii. Install pyenv-virtualenv• $ git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-
virtualenv
• $ echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
• $ exec $SHELL -l
Page 61
Vii. Install pyenv-virtualenv• $ pyenv install 2.7.14
• $ pyenv install 3.6.3
• $ pyenv virtualenv 3.6.3 venv3.6.3
Page 62
Vii. Install pyenv-virtualenv• $ git clone https://github.com/hephaex/ai-koss.git
• $ cd ai-koss
Page 63
Vii. Setup python environment• $ pyenv local venv3.6.3
•
Page 64
Vii. Setup python environment• $ pip install -I pip setuptools
•
Page 65
Vii. Setup python environment• $ pip install jupyter pandas bs4 matplotlib numpy tensorflow
•
•
Page 66
Vii. Setup python environment• $ jupyter notebook --generate-config
•
Page 67
Vii. Setup python environment• $ jupyter notebook password
•
Page 68
Vii. Setup python enviroment• $ echo "c.NotebookApp.ip = '192.168.56.10' " >>
~/.jupyter/jupyter_notebook_config.py
Page 69
Vii. Setup python enviroment• $ jupyter-notebook
Page 70
Vii. Setup python enviroment• 노트PC에서웹브라우져를열고, 192.168.56.10:8888 로접속합니다.
• jupyter notebook password에서입력한패스워드를입력합니다.
•
Page 71
Vii. Setup python environment• 파이쎤과텐서플로우실습을위한환경이꾸며졌습니다.
Page 72
Viii. Tutorial 01: Hello world !• 텐서플로우를이용해서 Hello World를출력해보자.
Page 73
Viii. Tutorial 02: Plot Graph• 파이썬으로수식을입력하고그결과를그래프로그려보자.
Page 74
Viii. Tutorial 03: computational graph• 텐서플로우가사용하는계산그래프에대해서알아보자.
• 텐서플로우의계산그래프를이용해서행렬연산을해보자.
Page 75
Viii. Tutorial 04: tensorflow mnist beginner• 텐서플로우로숫자맞추기기초를실행해보자.
Page 76
Viii. Tutorial 04: tensorflow mnist beginner• 텐서플로우로숫자맞추기전문가를실행해보자.
Page 77
iX. System Down
• Shutdown immediately and halt�$ sudo shutdown –h now.