Elroyjetson

Archive for August, 2020

Using LXD

Posted on: by

Whether to use LXD or Docker is like asking if you should use spaces or tabs. For me, I find LXD easier to wrap my head around in order to spin up a quick container. If you are using Ubuntu server 20.04 LXD comes pre-installed which makes it an easy choice.

Spinning up a new instance is simple three step process. First, initialize lxd and, unless you know you need something different, just accept the defaults.

#lxd init

Second, decide what Linux flavor you want to run in the container – in this example I will spin up an Ubuntu 20.04 container.

#lxc launch ubuntu:20.04 [<container name>]

The container name is optional. If it isn’t specified the container will have a random name assigned to it.

Finally, start the container and get a bash shell to run commands in.

#lxc exec <container name> -- /bin/bash

LXD is incredibly lightweight and you can run many LXD containers without impacting your system.

At this point you can provision your system to run whatever application you want. It can be configured by hand or you can use Ansible, etc. to provision it. The next step is to connect to the container from the network. By default, LXD containers are accessible from the localhost only. All that needs to happen is to configure a proxy between the host OS and the container.

In this example I will assume you want to connect to the container on port 80.

#lxc config device add <container name> <proxy name> proxy listen tcp:0.0.0.0:80 connect=tcp:127.0.0.1:80

To start and stop the container is fairly simple:

#lxc start <container name>
#lxc stop <container name>

One of the benefits of a container, besides the obvious containment advantage, is that it is pretty easy to constrain the resources that the container has access to. For instance, to limit a container to 1GB of RAM:

#lxc config set <containter name> limits.memory 1024MB

Limiting CPU is just as simple but you have 4 different ways to do this and I have found this article that does a good job of going through each different option very well.

One of the other common things you might like to do with a container is share a folder between the host and container. This is done using this command:

#lxc config device add <container name> <share name> disk source=<host path> path=<container path>

If you are looking for a simple way to get started with containers LXD is a good starting point.

We Need Intelligent Assistants Not Voice Activated Light Switches

Posted on: by

What does Jamie Dimon (Chairman and CEO of JP Morgan Chase & Co.) have in common with an Apple concept video from 1980’s? It is a product that he could really use today.

On August 1st, CNBC published an online post about Jamie Dimon’s morning routine. It is an unsurprisingly common stoic tale of coffee, no food, perhaps a brief moment of exercise and tons of daily reading. I have heard this story before. A friend of mine that runs a large manufacturing company has roughly the same routine. The problem is that this is an incredibly unproductive use of time and an incredible opportunity to utilize AI in a useful way.

Let’s face it, the AI as it is used today is mostly cheap parlor tricks. The modern equivalent of early 2000’s lolcats. Turn on the lights, what’s the weather, set a timer/alarm, or play a music playlist are the average things we use digital assistants for today. If you are a little more sophisticated maybe you have your favorite digital assistant du jour read you a text or email message and if you are really up to speed on digital assistant capabilities like Google Duplex maybe you will have it book a restaurant or hair appointment on your behalf (when it works).

But is any of this truly helpful or just cool tricks? I suspect that most people are like me and don’t book restaurant reservations in advance except on rare occasions and a hair appointment is booked infrequent enough that it is hardly saving time to have a digital assistant deal with it. Other scheduling sorts of things are mostly done online now-a-days, like a doctors appointment, car maintenance, etc. which are done in a few clicks.

I don’t really need a digital assistant. What I do need is and intelligent assistant. If you look back at the Apple Knowledge Navigator concept it is asked to go out and grab recent journal articles to update a lecture that had been previously given. The Knowledge Navigator took the previous lecture as input and then gathered new information based on this context. It provided a summary and was then able to take follow up questions for more specific answers. This is actually helpful.

The Knowledge Navigator took a stack of information, summarized it, took questions about it, created graphs and graphics summarizing specific data points to answer questions. It took data and allowed the requester to tease out specific gems in moments. This is what the average CEO needs. It is a good use of an intelligent assistant.

Jamie Dimon states that he reads “The New York Post ‘because everyone reads The New York Post.’ He says he reads a couple of sections, including the editorials. He also reads The Washington Post’s op-eds. ‘Then I read The New York Times, The Wall Street Journal, The Financial Times.’ He reads ‘tons of other stuff’ as well, including ‘Grant’s Interest Rate Observer, the Gloom, Boom & Doom Report and The Economist – a lot of economic stuff, analyst reports, transcripts [of speeches] and see what people say and stuff like that.'” This is his stack. The odds are plenty of other sources of data go unread simply due to time.

He then goes on to say that he prefers physical paper “because you tend to scan and see different stuff and it interests you and you read it.” He doesn’t read everything and who could with time constraints? This is a useful problem for AI to deal with. No more parlor tricks and lolcats. This is a good use of computation. Computers are a tool and the more data it can process into knowledge the better the competitive edge.

Some examples of this exist. IBM Watson for instance, parses stacks of data to provide health answers or customer service answers. DeepMind created AlphaGo to learn all about Go in order to beat a human player and have used this technology to “save energy, identify eye disease, accelerate science, and improve Google products used across the world.” When this is packaged in such a way that our devices, our homes, and our cars become intelligent assistants that life will get interesting. It is at that point that we will start making leaps forward as we can focus our time on innovation and not data collection and collation. Designer Jared Spool referred to this as “focusing on the ideal” in an article he wrote deconstructing the Knowledge Navigator concept.

I leave things with this thought, what is the ideal that should be focused on when it comes to an intelligent assistant? Is it the distillation of data in order to innovate or produce new knowledge and insights or should the focus be on more parlor tricks that gobsmack someone out of $1000 for a new slab of glass?