Coder Social home page Coder Social logo

xia0ben / rocker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wecacuee/rocker

0.0 1.0 0.0 83 KB

A tool to run docker containers with overlays and convenient options for things like GUIs etc.

License: Apache License 2.0

Python 94.09% EmberScript 5.91%

rocker's Introduction

rocker

A tool to run docker images with customized local support injected for things like nvidia support. And user id specific files for cleaner mounting file permissions.

Know extensions

Rocker supports extensions via entry points there are some built in but you can add your own. Here's a list of public repositories with extensions.

Prerequisites

This should work on most systems using with a recent docker version available.

Docker installation instructions: https://docs.docker.com/install/

NVIDIA settings

For the NVIDIA option this has been demonstrated using Ubuntu 16.04.5 running Kernel 4.15 and nvidia docker2 and the nvidia 384 driver. It did not work using the nvidia 340 driver.

It's also been tested on Ubuntu 18.04 with the 390 Nvidia driver.

Install nvidia-docker 2: https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0)

Intel integrated graphics support

For intel integrated graphics support you will need to mount through a specific device

--devices /dev/dri/card0

Installation

Debians

Debian packages are available from the ROS repositories. You can set them up in step one here then come back.

Then you can sudo apt-get install python3-rocker

PIP

Rocker is available via pip you can install it via pip using

pip install rocker

Development

To set things up in a virtual environment for isolation is a good way. If you don't already have it install python3's venv module.

sudo apt-get install python3-venv

Create a venv

mkdir -p ~/rocker_venv
python3 -m venv ~/rocker_venv

Install rocker

cd ~/rocker_venv
. ~/rocker_venv/bin/activate
pip install git+https://github.com/osrf/rocker.git

For any new terminal re activate the venv before trying to use it.

. ~/rocker_venv/bin/activate

Testing

To run tests install nose and coverage in the venv

. ~/rocker_venv/bin/activate
pip install nose
pip install coverage

Then you can run nosetests.

nosetests-3.4 --with-coverage --cover-package rocker

Notes:

  • Make sure to use the python3 instance of nosetest from inside the environment.
  • The tests include an nvidia test which assumes you're using a machine with an nvidia gpu.

Example usage

Fly a drone

Example usage with an iris

rocker --nvidia --user --pull --pulse tfoote/drone_demo

After the ekf converges,

You can send a takeoff command and then click to command the vehicle to fly to a point on the map.

Fly a plane

Example usage with a plane

rocker --nvidia --user --pull --pulse tfoote/drone_demo roslaunch sitl_launcher plane_demo.launch world_name:=worlds/plane.world gui:=false

In QGroundControl go ahead and make a mission, upload it, and then start the mission.

ROS 2 rviz

rocker --nvidia osrf/ros:crystal-desktop rviz2

Generic gazebo

On Xenial

rocker --nvidia osrf/ros:kinetic-desktop-full gazebo

On Bionic

rocker --nvidia osrf/ros:melodic-desktop-full gazebo

rocker's People

Contributors

sloretz avatar tfoote avatar wecacuee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.