Skip to content
Snippets Groups Projects
Commit 7268e021 authored by Kelter Christopher - Studierendenaccount's avatar Kelter Christopher - Studierendenaccount
Browse files

update readme

parent 3ffb3ee5
No related branches found
No related tags found
1 merge request!2Docker arm ci
...@@ -10,17 +10,44 @@ Check out the readme of this project for further information. ...@@ -10,17 +10,44 @@ Check out the readme of this project for further information.
- GPU support for opencv - GPU support for opencv
# Available docker images # Available docker images
| Image | Description | | Image | Platform | Description |
|---------------------------------------------------------------|----------------------------------------| |----------------------------------------------------------------|----------|------------------------------------------------------------------------|
| `docker.uibk.ac.at:443/informatik/stair/minibot-vision/ros/arm` | Tensorflow 2.7, ROS noetic, python 3.6 | | `docker.uibk.ac.at:443/informatik/stair/minibot-vision/ros:arm` | `ARMv8` | Tensorflow 2.7, ROS noetic, python 3.6 |
| `docker.uibk.ac.at:443/informatik/stair/minibot-vision/arm ` | cv_bridge, minibot-vision | | `docker.uibk.ac.at:443/informatik/stair/minibot-vision:arm` | `ARMv8` | cv_bridge for python 3.6, minibot-vision |
| `docker.uibk.ac.at:443/informatik/stair/minibot-vision/ros:amd` | `AMD64` | Minibot base image inkl. latest tensorflow and tensorflowjs, python 3.8 |
| `docker.uibk.ac.at:443/informatik/stair/minibot-vision:amd` | `AMD64` | minibot-vision |
Alle images are built automatically after a push / merge on the main branch.
# Getting started # Getting started
## Start and create docker container for one-time use
To run the core docker image with `tensorflow`, `ROS noetic` and `minibot-vision` with GPU support for tensorflow, execute the following command: To run the core docker image with `tensorflow`, `ROS noetic` and `minibot-vision` with GPU support for tensorflow, execute the following command:
``` ```
sudo docker run -it --runtime=nvidia -v /usr/local/cuda-10.2/targets/aarch64-linux/lib:/usr/local/cuda-10.2/targets/aarch64-linux/lib:ro --rm docker.uibk.ac.at:443/informatik/stair/minibot-vision/arm sudo docker run -it --runtime=nvidia -v /usr/local/cuda-10.2/targets/aarch64-linux/lib:/usr/local/cuda-10.2/targets/aarch64-linux/lib:ro --rm docker.uibk.ac.at:443/informatik/stair/minibot-vision:arm
``` ```
This creates an interactive container starting with the shell as entrypoint. After the container has been stopped it will be deleted. This creates an interactive container starting with the shell as entrypoint. After the container has been stopped it will be deleted.
## Create docker image for development use
### Create container for arm64v8 with GPU support for jetson nano
````
sudo docker create -i --name minibot_vision --network host --runtime=nvidia -v /usr/local/cuda-10.2/targets/aarch64-linux/lib:/usr/local/cuda-10.2/targets/aarch64-linux/lib:ro -v HOST_OS/CATKIN_WS_PATH:/app/catkin_ws/src docker.uibk.ac.at:443/informatik/stair/minibot-vision:arm
````
Creates a container for the jetson nano with GPU support. The container is identified by the name `minibot_vision`. `HOST_OS/CATKIN_WS_PATH` should be replaced with the path to the
catkin workspace on the host operating system. This directory will be mounted to `/app/catkin_ws/src` inside the container,
so that the content is available after updating the container. \
The container uses the `host` network.
### Create container for amd64 without GPU support for jetson nano
````
sudo docker create -i --name minibot_vision --network host -v HOST_OS/CATKIN_WS_PATH:/app/catkin_ws/src docker.uibk.ac.at:443/informatik/stair/minibot-vision:amd
````
### Start the image
The container can be started using the name of the container. With `-i` the container starts in the interactive mode.
````
sudo docker start -i minibot_vision
````
### Connect to running container
An interactive shell can be started using hte name of the container.
````
sudo docker exec -it minibot_vision /bin/bash
````
# Building docker container # Building docker container
## Base Image with Tensorflow and ROS noetic ## Base Image with Tensorflow and ROS noetic
...@@ -29,21 +56,22 @@ This image has been used to create an image with ROS noetic on Ubunut 18.04. The ...@@ -29,21 +56,22 @@ This image has been used to create an image with ROS noetic on Ubunut 18.04. The
### Build image from Dockerfile ### Build image from Dockerfile
Navigate to the directory `.docker` and execute the following command on the minibot: Navigate to the directory `.docker` and execute the following command on the minibot:
``` ```
sudo docker build --tag docker.uibk.ac.at:443/informatik/stair/minibot-vision/ros/arm . sudo docker build --tag docker.uibk.ac.at:443/informatik/stair/minibot-vision/ros:arm --file Dockerfile.arm .
``` ```
If you want to build the image on another device (not arm64/v8) the following command is required: If you want to build the image on another device (not arm64/v8) the following command is required:
``` ```
sudo docker buildx build --platform=linux/arm64/v8 --tag docker.uibk.ac.at:443/informatik/stair/minibot-vision/ros/arm . sudo docker buildx build --platform=linux/arm64/v8 --tag docker.uibk.ac.at:443/informatik/stair/minibot-vision/ros:arm --file Dockerfile.arm .
``` ```
## Core image with minibot vision ## Core image with minibot vision
Based on the `docker.uibk.ac.at:443/informatik/stair/minibot-vision/ros/arm` image a docker image with cv_bridge and the minibot-vision sources complied has been created: `docker.uibk.ac.at:443/informatik/stair/minibot-vision/arm`. The dockerfile for hte core image is located in the `.docker` directory. \
Based on the `docker.uibk.ac.at:443/informatik/stair/minibot-vision/ros:arm` image a docker image with cv_bridge and the minibot-vision sources complied has been created: `docker.uibk.ac.at:443/informatik/stair/minibot-vision/arm`.
Inside the container the minibot-vision sources are available in the directory`/app/catkin_ws/src`. Inside the container the minibot-vision sources are available in the directory`/app/catkin_ws/src`.
### Build image from Dockerfile ### Build image from Dockerfile
To build the image with the sources of the repository and using the base image the following command is required: To build the image with the sources of the repository and using the base image the following command is required:
``` ```
sudo docker build --tag docker.uibk.ac.at:443/informatik/stair/minibot-vision/arm . sudo docker build --tag docker.uibk.ac.at:443/informatik/stair/minibot-vision:arm --file Dockerfile.arm .
``` ```
If you want to build the image on another device (not arm64/v8) the following command is required: If you want to build the image on another device (not arm64/v8) the following command is required:
``` ```
sudo docker buildx build --platform=linux/arm64/v8 --tag docker.uibk.ac.at:443/informatik/stair/minibot-vision/arm . sudo docker buildx build --platform=linux/arm64/v8 --tag docker.uibk.ac.at:443/informatik/stair/minibot-vision:arm --file Dockerfile.arm .
``` ```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment