Docker image for running the hologram SDK

Hi all,

I’ve had various levels of difficulty getting the Hologram SDK running on different platforms. Between the community posts and the SDK documentation, it wasn’t super clear which versions of python were necessary, or which additional dependencies.

I think the bash script installer has simplified a lot of this, but I really wanted to have a better understanding of what was necessary to run the CLI / SDK. So, I created a docker image based on the official Python 3.7.8 image (built on Debian buster) and installed the one additional dependency in that image to get things running (sudo). The Github repo is:

I’ve also created a docker-compose file that attempts to document the flags used for giving Docker access to the underlying serial ports on the host system and privileges. I haven’t production or stress-tested this; just simply created a proof-of-concept.

Just wanted to share. The Github link to the Docker / docker-compose files are linked below. I’ve also tested this on my x86_64-based Linux laptop and a Raspberry Pi 3 running Raspbian 32-bit.

Once you’ve cloned the repo and are in the repo directory, you can run:
docker-compose --rm hologram

This will drop you into a bash shell as root where you can then execute the Holgoram CLI commands, for instance:
hologram network connect

Hope this is helpful.

Won’t this only run on linux systems? The volumes and devices you are sharing with the container would only exist on linux unless the docker daemon somehow maps COM ports to those paths. Not entirely sure about MacOS.

I think alpine images should also work though I haven’t tried mapping hardware ports to docker containers before. Overall a good way to keep things contained though :slight_smile:

Yeah, I haven’t really tested this outside of Linux. So, I can’t speak to whether it would work on OSX (probably depends on the underlying VM settings for running the Docker instance). I definitely can’t speak to Windows.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.