Skip to content

Latest commit

 

History

History
executable file
·
69 lines (52 loc) · 2.92 KB

docker-gap8.md

File metadata and controls

executable file
·
69 lines (52 loc) · 2.92 KB
title page_id
Docker Gap8
docker-gap8

Docker Gap8

Prebuild the docker image while in the same directory as the docker file.

Note: Depending on your operating system and docker installation you might need to perform the following commands with sudo. For more information see the docker documentation.

export GAP_SDK_VERSION=3.8.1

If you want to permanently use that version, we recommend that you put it inside your .bashrc. For example by appending it

echo 'export GAP_SDK_VERSION=3.8.1' >> ~/.bashrc 

Note: if you would like to also build docker images for SDK version 3.4, 3.5, 3.6 or 3.7, just replace the previous version number. The build process will checkout the right version of the SDK

docker build --tag gapsdk:${GAP_SDK_VERSION} --build-arg GAP_SDK_VERSION .

Open up the container to install the auto tiler

docker run --rm -it gapsdk:${GAP_SDK_VERSION} /bin/bash

Then in the container write:

cd /gap_sdk
source configs/ai_deck.sh
make autotiler

This will install the autotiler, which requires you to register your email and get a special URL token to download and install the autotiler.

In a separate terminal on your local machine, commit the changes to the image by first looking up the container ID status:

docker ps

Copy and past the container ID and replace the on the line here below, then run it in the separate terminal (also adapt the SDK version if you did before)

export GAP_SDK_VERSION=3.8.1
docker commit <container id> gapsdk:${GAP_SDK_VERSION}

This will save the install of the autotiler on your image. You can close the container in the other terminal with 'exit'

Running an Example

On your host navigate to the make-file you want to execute. For example

cd <path/to/AIdeck_examples/Repository>/GAP8/image_processing_examples/image_manipulations

The following docker commands will build and run the program on RAM (this will disappear after restarting of the AI-deck). Make sure to replace the /dev/ttyUSB0 with the actual path of your debugger (which can be found by dmesg on Ubuntu). Also make sure that the right .cfg file is selected that fits your debugger.

docker run --rm -it -v $PWD:/module/data/ --device /dev/ttyUSB0 --privileged -P gapsdk:${GAP_SDK_VERSION} /bin/bash -c 'export GAPY_OPENOCD_CABLE=interface/ftdi/olimex-arm-usb-tiny-h.cfg; source /gap_sdk/configs/ai_deck.sh; cd /module/data/;  make clean all run'

The following docker commands will build and flash the program on the GAP8 (this will NOT disappear after restart of the AI-deck).

docker run --rm -it -v $PWD:/module/data/ --device /dev/ttyUSB0 --privileged -P gapsdk:${GAP_SDK_VERSION} /bin/bash -c 'export GAPY_OPENOCD_CABLE=interface/ftdi/olimex-arm-usb-tiny-h.cfg; source /gap_sdk/configs/ai_deck.sh; cd /module/data/;  make clean all image flash'