mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
Add support for computers without NVIDIA hardware
This commit is contained in:
parent
61f76d6edb
commit
6034999702
3 changed files with 30 additions and 19 deletions
|
|
@ -1,7 +1,6 @@
|
|||
ARG BASE_IMAGE
|
||||
|
||||
ARG UBUNTU_VERSION
|
||||
|
||||
FROM nvidia/opengl:1.1-glvnd-runtime-ubuntu${UBUNTU_VERSION}
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
# For this build, we pull the entire ros image, and then merge the filesystem
|
||||
# with the nvidia/opengl image, so that displaying to the screen on GPU
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ is new enough.
|
|||
Once docker is installed, run the following command, and the project should show up:
|
||||
|
||||
```
|
||||
docker-compose build && xhost +local:root && docker-compose up
|
||||
docker-compose build ros && xhost +local:root && docker-compose up ros
|
||||
```
|
||||
|
||||
This command does three things:
|
||||
1) `docker-compose build`
|
||||
1) `docker-compose build ros`
|
||||
|
||||
This builds the project in a container. That means nothing is installed on your host machine!
|
||||
The first time this runs, this command will take a long while. After running it once, caching
|
||||
|
|
@ -43,7 +43,7 @@ This command does three things:
|
|||
|
||||
This command gives X the ability to display GUI's from within the docker container
|
||||
|
||||
3) `docker-compose up`
|
||||
3) `docker-compose up ros`
|
||||
|
||||
This runs the image specified in the `docker-compose.yml`, which by default runs
|
||||
the command `roslaunch myCobotROS control_slider.launch` within the container.
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
version: '3'
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
ros:
|
||||
image: elephantrobotics/my-cobot-ros
|
||||
command: ["roslaunch myCobotROS control_slider.launch"]
|
||||
x-app: &common
|
||||
command: [ "roslaunch myCobotROS control_slider.launch" ]
|
||||
privileged: true
|
||||
environment:
|
||||
PYTHONUNBUFFERED: 1
|
||||
|
|
@ -13,7 +11,21 @@ services:
|
|||
- "/tmp/.X11-unix:/tmp/.X11-unix:rw"
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
UBUNTU_VERSION: "16.04"
|
||||
args: &common-args
|
||||
ROS_DISTRO: "kinetic"
|
||||
PYMYCOBOT_VERSION: ">=2<3"
|
||||
BASE_IMAGE: nvidia/opengl:1.1-glvnd-runtime-ubuntu18.04
|
||||
|
||||
|
||||
services:
|
||||
# This configuration builds the project for computers with NVIDIA hardware
|
||||
nvidia-ros: *common
|
||||
|
||||
# This is the default for computers that don't have nvidia hardware accelerators
|
||||
ros:
|
||||
<<: *common
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
<<: *common-args
|
||||
BASE_IMAGE: ubuntu:18.04
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue