Sign inSign up

derekmerck/keras-tf

By derekmerck

•Updated about 8 years ago

Multi-arch Conda and Keras-TF Python Docker images for embedded systems.

Image
0

1.5K

derekmerck/keras-tf repository overview

⁠Conda xArch Docker Image

Build Status

Derek Merck
[email protected]⁠
Rhode Island Hospital and Brown University
Providence, RI

Multi-arch Conda and Keras-TF Python Docker images for embedded systems.

⁠Conda on Arm

The official arm32 MiniConda⁠ is Python 2 from 2015. These images use BerryConda⁠ compiled by jjhelmus. He also explains how to build a JetsonConda in the Conda/Constructor⁠ repo.*

*Need tdd libconda to the package manifest.

The official arm32 tensorflow wheels are available as nightly build artifacts⁠. The wheel name for the python3 build has to be manipuated to remove the platform restriction tags. NVIDIA provides a recent tensorflow wheel for their Jetson TXs⁠.

⁠Use It

$ docker run derekmerck/conda:py2
$ docker run derekmerck/keras-tf:py2

$ docker run derekmerck/conda:latest
$ docker run derekmerck/keras-tf:latest

⁠Build It

This image is based on the resin/$ARCH-debian:stretch image. Resin.io⁠ base images include a QEMU⁠ cross-compiler to facilitate building images for low-power single-board computers on more powerful Intel-architecture desktops and servers.

docker-compose.yml contains build descriptions for all relevant architectures.

⁠amd64
$ docker-compose build conda-py2-amd64 keras-tf-py2-amd64
$ docker-compose build conda-py3-amd64 keras-tf-py3-amd64

Desktop computers/vms, UP boards⁠, and the Intel NUC⁠ are amd64 devices. The appropriate image can be built and pushed from Travis CI⁠.

⁠arm32v7

Most low-power single board computers such as the Raspberry Pi and Beagleboard are arm32v7 devices. Appropriate images can be cross-compiled and pushed from Travis CI.

$ docker-compose build conda-py2-arm32v7 keras-tf-py2-arm32v7
$ docker-compose build conda-py3-arm32v7 keras-tf-py3-arm32v7
⁠arm64v8

The NVIDIA Jetson TX2⁠ uses a Tegra arm64v8 cpu. The appropriate image can be built natively and pushed from Packet.io⁠, using a brief tenancy on a bare-metal Cavium ThunderX ARMv8 server.

$ apt update && apt upgrade
$ curl -fsSL get.docker.com -o get-docker.sh
$ sh get-docker.sh 
$ docker run hello-world
$ apt install git python-pip
$ pip install docker-compose
$ git clone http://github.com/derekmerck/conda-xarch
$ cd conda-xarch
$ docker-compose build conda3-arm64v8

Although Resin uses Packet ARM servers to compile arm32 images⁠, the available ThunderX does not implement the arm32 instruction set, so it cannot compile natively for the Raspberry Pi⁠.

⁠Manifest It

After building new images, call manifest-it.py to push updated images and build the Docker multi-architecture service mappings.

$ python3 manifest-it conda-xarch.manifest.yml

⁠License

MIT

Tag summary

Content type

Image

Digest

Size

876.9 MB

Last updated

about 8 years ago

docker pull derekmerck/keras-tf