diff --git a/README.md b/README.md index 610c056bea3c49b7dd3f8c7edfe98ff1970ab748..5e0124fb8cb3aec804af7c5a4681c298e68fd3c8 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,62 @@ Things needed to build a development docker image based on waraps base LRS image. +Also instructions how to run different units from a docker. Thie will +replace the setup we have had with virtual machines that combitech +have used. + Will be used for more things in the future. -## Build user specific developer docker image +## Running units from docker + +Start the wara docker on all machines were you want to run units. +```bash +docker run --gpus all \ + --network host \ + --ulimit nofile=1024 \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix${DISPLAY}\ + -e ROS_HOSTNAME=localhost \ + --rm -it --name wara gitlab.liu.se:5000/lrs/waraps_docker_images/wara-melodic:v01 bash +``` +Can be detached with C-p C-q. + +It is possible to give argument "op 0" and so on instead of bash to +docker run. But that mean we have to start new containers for each +unit. But if we are running the different units on diffrent computers +we can start that way. + +To start /op0, /djisim0, /djisim1, /pirayasim0 do: +```bash +docker exec -it wara bash +op 0 +``` + +```bash +docker exec -it wara bash +djisim 0 +``` + +```bash +docker exec -it wara bash +djisim 1 +``` +```bash +docker exec -it wara bash +pirayasim 0 +``` + + +## User Specific Development Docker + +### Build user specific development docker image ```bash cd docker ./build ``` -## Run the user specific developer image +### Run the user specific developer image ```bash cd docker @@ -20,7 +66,7 @@ cd docker The run.sh script takes one argument and it is the directory that is mounted as home directory. -## Init files +### Init files You have to create your own init files. diff --git a/script/wexec b/script/wexec new file mode 100755 index 0000000000000000000000000000000000000000..1b87f78807ebcd176cec144b32ff4fb5fd0eb495 --- /dev/null +++ b/script/wexec @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec -it wara bash diff --git a/script/wgrun b/script/wgrun new file mode 100755 index 0000000000000000000000000000000000000000..745e00c0d98de95d420a650e922a5a2286e77844 --- /dev/null +++ b/script/wgrun @@ -0,0 +1,10 @@ +#!/bin/bash + +docker run --gpus all \ + --network host \ + --ulimit nofile=1024 \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix${DISPLAY}\ + -e ROS_HOSTNAME=localhost \ + --rm -it --name wara gitlab.liu.se:5000/lrs/waraps_docker_images/wara-melodic:v01 "$@" + diff --git a/script/wrun b/script/wrun new file mode 100755 index 0000000000000000000000000000000000000000..d643a20d7edc69d121065e9f8804e8ae014dcf71 --- /dev/null +++ b/script/wrun @@ -0,0 +1,9 @@ +#!/bin/bash + +docker run \ + --network host \ + --ulimit nofile=1024 \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix${DISPLAY}\ + -e ROS_HOSTNAME=localhost \ + --rm -it --name wara gitlab.liu.se:5000/lrs/waraps_docker_images/wara-melodic:v01 "$@"