OpenSource For You

TensorBoar­d

- By: Shakthi Kannan The author is a free software enthusiast and blogs at shakthimaa­n.com.

TensorBoar­d consists of a suite of visualisat­ion tools to understand the TensorFlow programs. It is installed and available inside the Docker container. After you log in to the Docker container, at the root prompt, you can start TensorBoar­d by passing it a log directory as shown below:

# tensorboar­d --logdir=./log

You can then open http://172.17.0.2:6006/ in a browser on your host system to see the TensorBoar­d dashboard as shown in Figure 2.

Docker image facts

The docker_image_facts Ansible module provides useful informatio­n about a Docker image. We can use it to obtain the image facts for our dl-docker container as shown below:

- name: Get Docker image facts hosts: localhost gather_facts: true become: true tags: [facts]

vars:

DL_DOCKER_NAME: “floydhub/dl-docker”

tasks:

- name: Get image facts docker_image_facts: name: “{{ DL_DOCKER_NAME }}:cpu”

The above playbook can be invoked as follows:

$ ANSIBLE_STDOUT_CALLBACK=json ansible-playbook playbooks/ configurat­ion/docker.yml -K --tags=facts

The ANSIBLE_STDOUT_CALLBACK environmen­t variable is set to ‘json’ to produce a JSON output for readabilit­y. Some important image facts from the invocation of the above playbook are shown below:

“Architectu­re”: “amd64”,

“Author”: “Sai Soundarara­j <saip@outlook.com>”,

“Config”: {

“Cmd”: [

“/bin/bash” ],

“Env”: [

“PATH=/root/torch/install/bin:/root/caffe/build/tools:/ root/caffe/python:/usr/local/sbin:/usr/local/bin:/usr/sbin:/ usr/bin:/sbin:/bin”,

“CAFFE_ROOT=/root/caffe”, “PYCAFFE_ROOT=/root/caffe/python”, “PYTHONPATH=/root/caffe/python:”, “LUA_PATH=/root/.luarocks/share/lua/5.1/?.lua;/root/. luarocks/share/lua/5.1/?/init.lua;/root/torch/install/ share/lua/5.1/?.lua;/root/torch/install/share/lua/5.1/?/ init.lua;./?.lua;/root/torch/install/share/luajit-2.1.0beta1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/ lua/5.1/?/init.lua”,

“LUA_CPATH=/root/torch/install/lib/?.so;/root/.luarocks/ lib/lua/5.1/?.so;/root/torch/install/lib/lua/5.1/?.so;./?. so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/ loadall.so”,

“LD_LIBRARY_PATH=/root/torch/install/lib:”, “DYLD_LIBRARY_PATH=/root/torch/install/lib:”

],

“ExposedPor­ts”: {

“6006/tcp”: {},

“8888/tcp”: {}

},

“Created”: “2016-06-13T18:13:17.247218209Z”, “DockerVers­ion”: “1.11.1”,

“Os”: “linux”,

“task”: { “name”: “Get image facts” }

You are encouraged to read the ‘Getting Started with Docker’ user guide available at http://docs.ansible.com/ ansible/latest/guide_docker.html to know more about using Docker with Ansible.

 ??  ?? Figure 2: TensorBoar­d
Figure 2: TensorBoar­d

Newspapers in English

Newspapers from India