Skip to content
Alex Hoffman edited this page Apr 21, 2023 · 6 revisions

Docker Setup

1. Dependencies

2. Setup

  1. Install dependencies
sudo pacman -S wireshark docker
  1. Set services
# have to double check if this is necessary,
# may be done automagically
sudo systemctl enable docker.service
sudo systemctl start docker.service --now
  1. Add user to docker and wireshark groups
# enables non-sudo access to these resources
sudo usermod -aG docker <user>
sudo usermod -aG wireshark <user>
  1. Build docker
cd benchmarking
make

2. Docker Enviroment

Steps to setup the environment are modeled after the official coral tutorial. A custom docker build based on ubuntu 20.04 is created and tagged with all the necessary dependencies for a working system.

2.1 Introduction

The entry point of the system is run through the entry.sh script. Any changes and modifications to the workflow can be done there. How the environment should be prepped and launched is quite flexible given a shell script can run any secondary programs necessary. It can read environment variables, perform control flow call on a debugger, run a series of scripts or anything else that comes to mind.

The entire project is mounted as a volume on the docker. That means that all changes done there are persistent on the host system afterwards. This is done to avoid unnecessary copying of files and obviously to have a uniform containerized and reproducible environment to work in.

As mentioned before, the docker is setup to run the entry.sh on launch, however since this script is a file on the host system, one can make quick changes to it and change completely the program flow without having to rebuild the docker, which in all honesty takes too much time.

2.2 Usage

  1. Build the custom docker:
make
  1. Run the application:
make run
  1. Debug the application:
# as of now, this will just call a bash shell upon entry instead of
# the entry script, giving the user the opportunity to snoop around.
# This can be easily changed, just look at entry.sh
make debug
  1. Stop application, should however be stopped automatically:
make stop
  1. Clean system from custom docker and possible running children:
make clean
  1. Tensorflow Source For programs requiring Tensorflow, for example building of the summarize_graph tool, one will need the TF source.

This by default can be found in /home/tensorflow_$TF_VERSION.

Clone this wiki locally