OpenSource For You - - Ad­min - 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 in­side the Docker con­tainer. Af­ter 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 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]


DL_­DOCK­ER_­NAME: “floy­d­hub/dl-docker”


- name: Get im­age facts dock­er_im­age_­facts: name: “{{ DL_­DOCK­ER_­NAME }}:cpu”

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

$ AN­SI­BLE_STD­OUT_­CALL­BACK=json an­si­ble-play­book play­books/ con­fig­u­ra­tion/docker.yml -K --tags=facts

The AN­SI­BLE_STD­OUT_­CALL­BACK 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”,

“CAF­FE_­ROOT=/root/caffe”, “PY­CAF­FE_­ROOT=/root/caffe/python”, “PYTHON­PATH=/root/caffe/python:”, “LU­A_­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”,

“LU­A_C­PATH=/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_LI­BRARY_­PATH=/root/torch/in­stall/lib:”, “DYLD_LI­BRARY_­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/lat­est/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.