Select Git revision
MP_chat 3.54 KiB
Two useful tools:
- Rocker to launch containerds and to develop inside them.
https://github.com/osrf/rocker
Rocker is a small (smart) tool that allows to launch containers with extra options, easier than docker alone, e.g:
rocker --home --user ros:melodic bash
This launches a container from the image ros:melodic, mounting your home folder and seting up an user using your UID/GID (This allows to edit files inside the container, then outside at the host, the files remain edited by yourself)
This is also posible to achieve using only docker, but rocker make the task easier.
An useful idea is ti set up an alias in order to launch other bash instances inside the same container, in order to get more terminals in the same environment.
One drawback using rocker (docker) is, all dependecies of the software and tools must be installed everytime a container is launched for first time, this is time consuming.
In order to solve this issue, there is a second tool: ddeploy
https://git.code.tecnalia.com/tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy
This is a simple script that allows to deploy applications as docker images.
ddeploy take the application sources to be container-ized, and automaticaly build an image with all dependencies installed and the provided sources compiled and installed.
Therefore, in order to work in the project XYZ, the first step is to build a custom image for the project using ddeploy, and then, you can to launch a "working" container from the built imagen using rocker.
Both rocker and ddeploy could be installed in their own Python venvs.
Python venvs is a Python tool to build virtual environments and to allow installing inside them projects with all dependencies solved, without need to modify the Python base set up.
python3 -m venv ddeploy
git clone git@git.code.tecnalia.com:tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy.git
git checkout current-folder-fix
source bin/activate
pip install -e src/ddeploy
deactivate
./bin/ddeploy --name cosa --distro melodic -s git+ssh://github.com/ros/std_msgs.git#kinetic-devel
git clone https://github.com/ros/std_msgs.git
~/.venv/ddeploy/bin/ddeploy --name mensajes --distro melodic -s std_msgs
python3 -m venv ddeploy
rocker --home --user --x11 --nvidia --ssh --git osrf/ros:melodic-desktop-full bash
rocker --home --user --x11 --nvidia --ssh --git ubuntu:bionic bash
Executing command:
docker run -it -v /etc/gitconfig:/etc/gitconfig:ro -v /home/andres/.gitconfig:/home/None/.gitconfig:ro -v /home/andres:/home/andres --gpus all -e SSH_AUTH_SOCK -v /run/user/1000/keyring/ssh:/run/user/1000/keyring/ssh -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 -e XAUTHORITY=/tmp/.dockersd81ncol.xauth -v /tmp/.dockersd81ncol.xauth:/tmp/.dockersd81ncol.xauth -v /tmp/.X11-unix:/tmp/.X11-unix -v /etc/localtime:/etc/localtime:ro 5ba9d44fd173 bash
sudo usermod -aG docker USER.NAME
# docker login tecnalia-robotics-docker.artifact.tecnalia.com
git lfs install
# git config --global credential.helper 'cache --timeout=3600'
rosdep update
sudo apt update
// # Lanzar imagen con parámetros básicos de rocker
rocker --home --user --x11 --nvidia --ssh --git devenv:melodic bash
rocker --mp-dev-helpers --mp-dind-host --mp-en-us-locale --x11 --nvidia --home --user --ssh --git devenv:melodic bash
kawada_lab_application.ddeploy.yaml
ddeploy --name dummy:noetic --distro noetic -s git@git.code.tecnalia.com:tecnalia_robotics/flexbotics/flexbotics_test/dummy_application.git#noetic-devel -s dummy_application/.rosinstall -w 1
Repository type 'git@git.code.tecnalia.com' is not supported