Skip to content

SW Installation

Ugo Pattacini edited this page Dec 5, 2022 · 67 revisions

ℹ Introduction

Please, install the docker image we provide for the training (see below).

This is methodologically relevant as we aim to maximize the effectiveness of training hours by focusing on the content of the course rather than spending time troubleshooting installation snags that may arise along the way.

By contrast, if you want to install the software yourself, you can browse our official 🌐 manual. At any rate, to customize the installation to the specific needs of the training, you ought to inspect the steps in the docker recipe and apply the required options.

🐳 Instructions to run the Docker container locally

To run the docker container, go through the following steps:

  1. Make sure that you have installed Docker correctly for your platform.
  2. Pull the docker image:
    docker pull ghcr.io/icub-training/sandbox:latest
    Tags older than latest are available at the sandbox versions page.
  3. Launch the container:
    docker run -it -p 6080:6080 --name <container_name> ghcr.io/icub-training/sandbox:latest
    where container_name is an optional id that the user can specify to ease the later identification of the container.
  4. From within the container shell, launch the following scripts:
    start-vnc-session.sh
  5. Open up the browser on your host and connect to localhost:6080 to get to the workspace desktop GUI.
    You should get the outcome below 🎉

⚙ Stop the container

Once done with the container, you can stop it in two different ways:

  • Log out from the container shell straight away by pressing CTRL+D.
  • Resorting to the docker command:
    docker stop <container_name>

⚙ Restart the container

docker start <container_name>
docker attach <container_name>

⚙ Remove a stopped container

docker container rm <container_name>

⚙ List containers

docker container ls -a

⚙ Trim the docker image

To permanently apply to a new image the changes you made to the docker container, you need to:

  1. Stop the container.
  2. Commit the changes to a new image:
    docker commit <container_name> <image_name>

⚙ Clean up all resources

docker system prune -a

🔨 Troubleshooting docker

  • Stick to standard terminals (opened via docker attach <container_name> or via the terminal in VNC) when launching docker commands. We spotted problems when dealing with terminals opened up from within the Docker GUI in Windows.
  • If the graphical interface of the container stops somehow working, just start it over by launching again the following command:
    start-vnc-session.sh

✔ Check your installation

Test whether the following tutorial runs as expected.

  1. From the docker desktop GUI, open up a shell.
  2. Within the shell terminal, type in the following:
    git clone https://github.com/vvv-school/tutorial_cartesian-interface.git
    cd tutorial_cartesian-interface/smoke-test
    ./test.sh
    ⚠ Copy-paste does not work from the host to the docker desktop GUI. To get around this, simply browse this web page from within the docker desktop straight away: this time, copy-paste will work!
You should get the outcome below 🎉

☁ Instructions to run the Docker container on the web

You may consider relying on the Gitpod Cloud IDE as infrastructure to run the docker image on the cloud:

🤔 Problems?

Should you experience any problem, don't hesitate to contact us by posting to our 👋 Q&A system.