Monday, September 18, 2017

Docker and Kubernetes DevOps


see http://wiki.obrienlabs.cloud/display/DEV/Kubernetes+Developer+Guide

NAT settings for OSX Fusion 8.5


sudo vi /Library/Preferences/VMware\ Fusion/vmnet8/nat.conf
[incomingtcp]

# Use these with care - anyone can enter into your VM through these...
# The format and example are as follows:
#<external port number> = <VM's IP address>:<VM's port number>
#8080 = 172.16.3.128:80

8880 = 192.168.241.134:8880

$ sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
Stopped DHCP service on vmnet1
Disabled hostonly virtual adapter on vmnet1
Stopped DHCP service on vmnet8
Stopped NAT service on vmnet8
Disabled hostonly virtual adapter on vmnet8
Stopped all configured services on all networks
$ sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start
Enabled hostonly virtual adapter on vmnet1
Started DHCP service on vmnet1
Started NAT service on vmnet8
Enabled hostonly virtual adapter on vmnet8
Started DHCP service on vmnet8
Started all configured services on all networks
$ curl 127.0.0.1:8880

{"id":"v1","type":"apiVersion","links":{"accounts":"http:\/\/127.0.0.1:8880\/v1\/accounts","agents":"http:\/\/127.0.0.1:8880\/v1\/agents","apiKeys":"http:\/\/127.0.0.1:8880\/


Running a VNC ubuntu VM inside the namespace

for root just run the following line and skip to next section
curl https://releases.rancher.com/install-docker/1.12.sh | sh
# when running as non-root (ubuntu) run the following and logout/log back in
sudo usermod -aG docker ubuntu

Also we are using this vnc-portal in production - been vetted for 4 months


his docker image is on


docker run -it --rm -p 6080:80 dorowu/ubuntu-desktop-lxde-vnc
access it with


if you ctrl-c then the docker will exit - it is stateless

Sunday, March 19, 2017

Optimizing your Macbook Pro 15 2016 for development - minimize touchbar interference


This review is for the Late 2016 Macbook Pro 15 inch with the upgraded 2.9GHz i7-6920HQ, the 1TB SSD and the ATI Radeon Pro 460 4Gb and the touchbar.

Sometimes I get asked why I just don't use a high end Lenovo (with a Xeon and 64G ram).  The issue is I also need iOS development via XCode.  So for now I need to put up with 16G ram until 32G comes out.

Most hard core users of the macbook pro will benefit from the workarounds below - especially working around the new touchbar - by mostly disabling it.

After working with the laptop for home and office development - I can say that it is a better machine than the previous generation.  The improvements outweigh the discrepancies at a bit higher price.

The HD is really fast - faster than either my raid0 4 drive Samsung 850 pro or my Intel 750.  The screen is brighter, the CPU is 23% faster under full load (12% because of clock speed), the GPU is twice as fast.

The keys are louder and bit clunky, but the biggest issue is the touchbar - it must be disabled!.
As soon as you start using the machine in its default config - your finger will slide off the delete key - where it will start siri (all the time).  The fix for the touchbar is to remove all the icons by default and only enable the function keys for specific applications.  The rest of the time only the escape key shows.  When the mac touchbar is disabled like this then when your fingers - just touch above the number keys - you wont invoke the touchbar.

Summary

0 - The F4 key rarely works - this is a Safari issue though

1 - Globally disable the touchbar except for the escape key for all non-development apps


2 - Enable the function keys for development apps like Eclipse and IntelliJ





Macbook 2016 Improvements

The 2016 i7-6920HZ CPU runs 23% faster than the my late 2013 i7-4960 (12% of this is due to a clock speed jump from 2.6 to 2.9 GHz)
The GPU is faster - although this is hard to measure because I went from an NVidia 750GT to an ATI 460

Macbook 2016 Issues

The keyboard is lower quality than the 2015 model
The GPU is ATI instead of NVidia - which locks us out of must CUDA based libraries like TensorFlow leaving us with OpenCL
The touchbar causes multiple issues - the biggest one is launching siri or changing sound/screen inadvertently by accidentally touching the bar above the number row.

Minimize Macbook Pro 2016 Touchbar effects

The first thing you will notice when using the 2016 macbook will be how the touchbar causes issues north of the delete key when your fingers slide off the northbound part of the key.
The goal is to disable the touchbar for most apps leaving just the escape key.



For development apps that require function keys like the F3/F4 (navigation)and F5/F6/F7/F8 (debug) functions in Eclipse - enable just the function key view.

Here in eclipse we frequently need F3 to load a class and F4 to get the inheritance heirarchy

During a debug session we use F5 to enter, F6 to run, F7 to skip and F8 to resume



CPU and GPU performance

On average GPU speed for the 2016 macbook pro (top model) is 12x the cpu speed (all 4 cores)
Surprisingly the embedded GPU in the CPU runs slower than the embedded Iris GPU in my old 2013 macbook pro.

OpenCL

Single Core CPU = 13
Multicore 4 CPU = 50
Embedded HD 530 GPU = 128
ATI HD 460 GPU = 505

Java

Connectors

I'll get into theUSB-C connectors shortly

Cases

Get the Thule case for your Macbook Pro 15 https://www.thule.com/en-us/ca/computer-phone-cases/laptop-cases/thule-gauntlet-30-macbook-pro-sleeve-15-_-tl_85854234856

Noise

The new keyboard is louder - try to type quieter in an office setting

Thursday, February 2, 2017

Deep Learning Experiments

Goal: 

Ramp up on Deep Learning techniques by building a basic ANN to classify radar images for example

Get some background in deep learning (a specialized subset of machine learning concentrated on the "Greedy Layer-Wise Unsupervised Pretraining procedure" - Hinton, 2006 - University of Toronto) and the "Long Short-Term Memory model - Hochreiter and Schmidhuber 1997".
Design/Theory Preparation
Get the following Nov 2016 MIT book from Amazon by Ian Goodfellow, Yoshua Benglo, Aaron Courville - (one for work, and one for home - as it is usually out of stock).  Review your linear transformation and matrix math to prep.

References:

Deep Learning, 2016, Ian Goodfellow, Yoshua Benglo, Aaron Courville

http://127.0.0.1:20959/doc/manual/R-intro.html#Related-software-and-documentation
https://www.microsoft.com/cognitive-services/en-us/sign-up
https://deeplearning4j.org/devguide
https://openai.com/blog/
https://github.com/obriensystems/requests-for-research
https://deepfield.com/cloud-genome/


Total Pageviews

Followers