Skip to content

eslamsherif5/upolis_docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerfile (Micropolis Robotics)

Supported features/libraries:

  • Base image: nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04
  • CMake v3.24.2
  • CUDA v11.3.1
  • OpenCV v4.5.2
  • VTK v8.2.0
  • PCL v1.11
  • ROS2 foxy (and Gazebo)
  • NVIDIA-Accelerated
  • SSH-Enabled
  • External workspace mounted at (/home/$USERNAME/Docker/$CONTAINER_NAME_workspace)

Known issues:

  • rviz2 is not working but this can be solved by running ROS2 accros multiple machines by setting up ROS_DOMAIN_ID & ROS_DISCOVERY_SERVER environment variables on your host PC

Requirements

The image is already built and pushed on our local server

  • Install docker from official documentation
  • Proceed to the Post-Installation steps for Linux
  • Install NVIDIA Container Toolkit
  • Configure local docker registry as follows
    1. Run
      $ sudo nano /etc/docker/daemon.json
    2. Edit the file daemon.json as below
      {
          "runtimes": {
              "nvidia": {
                  "path": "nvidia-container-runtime",
                  "runtimeArgs": []
              }
          },
          "insecure-registries" : ["X.X.X.X:5002"] <-- ADD THIS LINE (X.X.X.X = Server IP)
      }
      Then save and exit
    3. Restart Docker for the changes to take effects
      $ sudo systemctl daemon-reload
      $ sudo systemctl restart docker
  • Configure ROS2 across multiple machines
    $ echo "export ROS_DISCOVERY_SERVER=X.X.X.X:11811" >> ~/.bashrc
    $ echo "export ROS_DOMAIN_ID=<your_domain_id>" >> ~/.bashrc
    Where:

How to use

The image is already built and pushed on our local server

  • To get the image locally on your host PC run:
    docker pull X.X.X.X:5002/upolis:latest
    Where: X.X.X.X = Server IP
  • To run a container based on upolis image, use the file docker-launch.sh in this repository as follows
    $ git clone https://github.com/eslaaam3/upolis_docker/
    $ cd upolis_docker
    $ chmod +x docker-launch.sh
    $ # ./docker-launch.sh <container_name> <image_name>
    $ ./docker-launch.sh <container_name> X.X.X.X:5002/upolis:latest
  • Once you're inside the container, there's a directory on your host PC mounted to the container where you can share files between host PC and container
                 H O S T   P C          :  CONTAINER
    ~/Docker/<container_name>_workspace : ~/workspace
  • Super user password inside the container is upolis, and it can be changed using chpasswd command, but generally, there is no need to change it

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published