Ten­sorBoard

OpenSource For You - - Admin - By: Shak­thi Kan­nan The au­thor is a free soft­ware en­thu­si­ast and blogs at shak­thi­maan.com.

Ten­sorBoard con­sists of a suite of vi­su­al­i­sa­tion tools to un­der­stand the Ten­sorFlow pro­grams. It is in­stalled and avail­able inside the Docker con­tainer. After you log in to the Docker con­tainer, at the root prompt, you can start Ten­sorBoard by pass­ing it a log di­rec­tory as shown be­low:

# ten­sorboard --logdir=./log

You can then open http://172.17.0.2:6006/ in a browser on your host sys­tem to see the Ten­sorBoard dash­board as shown in Fig­ure 2.

Docker im­age facts

The dock­er_im­age_­facts An­si­ble mod­ule pro­vides use­ful in­for­ma­tion about a Docker im­age. We can use it to ob­tain the im­age facts for our dl-docker con­tainer as shown be­low:

- name: Get Docker im­age facts hosts: lo­cal­host gath­er_­facts: true be­come: true tags: [facts]

vars:

DL_DOCKER_NAME: “floy­d­hub/dl-docker”

tasks:

- name: Get im­age facts dock­er_im­age_­facts: name: “{{ DL_DOCKER_NAME }}:cpu”

The above play­book can be in­voked as fol­lows:

$ ANSIBLE_STDOUT_CALLBACK=json an­si­ble-play­book play­books/ con­fig­u­ra­tion/docker.yml -K --tags=facts

The ANSIBLE_STDOUT_CALLBACK en­vi­ron­ment vari­able is set to ‘json’ to pro­duce a JSON out­put for read­abil­ity. Some im­por­tant im­age facts from the in­vo­ca­tion of the above play­book are shown be­low:

“Ar­chi­tec­ture”: “amd64”,

“Au­thor”: “Sai Soundararaj <saip@out­look.com>”,

“Con­fig”: {

“Cmd”: [

“/bin/bash” ],

“Env”: [

“PATH=/root/torch/in­stall/bin:/root/caffe/build/tools:/ root/caffe/python:/usr/lo­cal/sbin:/usr/lo­cal/bin:/usr/sbin:/ usr/bin:/sbin:/bin”,

“CAFFE_ROOT=/root/caffe”, “PYCAFFE_ROOT=/root/caffe/python”, “PYTHONPATH=/root/caffe/python:”, “LUA_PATH=/root/.lu­arocks/share/lua/5.1/?.lua;/root/. lu­arocks/share/lua/5.1/?/init.lua;/root/torch/in­stall/ share/lua/5.1/?.lua;/root/torch/in­stall/share/lua/5.1/?/ init.lua;./?.lua;/root/torch/in­stall/share/lu­a­jit-2.1.0beta1/?.lua;/usr/lo­cal/share/lua/5.1/?.lua;/usr/lo­cal/share/ lua/5.1/?/init.lua”,

“LUA_CPATH=/root/torch/in­stall/lib/?.so;/root/.lu­arocks/ lib/lua/5.1/?.so;/root/torch/in­stall/lib/lua/5.1/?.so;./?. so;/usr/lo­cal/lib/lua/5.1/?.so;/usr/lo­cal/lib/lua/5.1/ load­all.so”,

“LD_LIBRARY_PATH=/root/torch/in­stall/lib:”, “DYLD_LIBRARY_PATH=/root/torch/in­stall/lib:”

],

“Ex­posedPorts”: {

“6006/tcp”: {},

“8888/tcp”: {}

},

“Cre­ated”: “2016-06-13T18:13:17.247218209Z”, “Dock­erVer­sion”: “1.11.1”,

“Os”: “linux”,

“task”: { “name”: “Get im­age facts” }

You are en­cour­aged to read the ‘Get­ting Started with Docker’ user guide avail­able at http://docs.an­si­ble.com/ an­si­ble/latest/guide_­docker.html to know more about us­ing Docker with An­si­ble.

Fig­ure 2: Ten­sorBoard

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.