Giter Site home page Giter Site logo

docker-opengl's Introduction

docker-opengl

A docker image that supports rendering graphical applications, including OpenGL apps.

https://circleci.com/gh/thewtex/docker-opengl.svg?style=svg

Overview

This Docker image supports portable, CPU-based graphical application rendering, including rendering OpenGL-based applications. An X session is running on display :0 and can be viewed through HTML5 viewer on any device with a modern web browser (Mac OSX, Windows, Linux, Android, iOS, ChromeOS, ...). It can be used to expose a graphical interface from a Docker container or to run continuous integration tests that require a graphical environment.

Quick-start

Execute the run.sh script.

Details

By default, the run.sh start up the graphical session and points the user to a URL on the local host where they can view and interact with the session. On application exit, the run.sh will print the application's console output and exit with the application's return code.

The session runs Openbox as a non-root user, user that has password-less sudo privileges. The browser view is an HTML5 viewer that talks over websockets to a VNC Server. The VNC Server displays a running Xdummy session.

To customize the Docker image for your graphical application, set the APP environmental variable to the shell command required to start the application. For example:

ENV APP /usr/bin/my-gui-app

The run.sh script can be used to drive start-up. It is customizable with flags:

Usage: run.sh [-h] [-q] [-c CONTAINER] [-i IMAGE] [-p PORT] [-r DOCKER_RUN_FLAGS]

This script is a convenience script to run Docker images based on
thewtex/opengl. It:

- Makes sure docker is available
- On Windows and Mac OSX, creates a docker machine if required
- Informs the user of the URL to access the container with a web browser
- Stops and removes containers from previous runs to avoid conflicts
- Mounts the present working directory to /home/user/work on Linux and Mac OSX
- Prints out the graphical app output log following execution
- Exits with the same return code as the graphical app

Options:

  -h             Display this help and exit.
  -c             Container name to use (default opengl).
  -i             Image name (default thewtex/opengl).
  -p             Port to expose HTTP server (default 6080). If an empty
                 string, the port is not exposed.
  -r             Extra arguments to pass to 'docker run'. E.g.
                 --env="APP=glxgears"
  -q             Do not output informational messages.

See the example directory for a derived image and run.sh script that runs the glxgears OpenGL demo program.

Credits

This configuration was largely inspired by the dit4c project.

docker-opengl's People

Contributors

jcfr avatar mayeulchassagnard avatar thewtex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-opengl's Issues

How to make it interactive?

I want to use it to be basis, and build an image. When I run it , it's not interactive. How to solve this problem?

Update base image

This is useful but debian:jessie is very old. Could we get a version with a newer base image?

CentOS branch fails performing yum update

Hi,

I am trying to build the CentOS branch but it fails with the following message

Determining fastest mirrors
Error: Cannot find a valid baseurl for repo: base
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
The command '/bin/sh -c yum update -y && yum install -y mesa-libGL net-tools sudo xorg-x11-server-utils xorg-x11-server-Xvnc-source xorg-x11-xinit xorg-x11-drv-dummy xorg-x11-drv-void' returned a non-zero code: 1
make: *** [build] Error 1

Cheers

LLVM ERROR: Cannot select: intrinsic %llvm.x86.sse41.pblendvb

We're seeing this any idea what can cause it?

seed@fb-threadripper1:~/docker-opengl/example$ ./run.sh

Setting up the graphical application container...

Point your web browser to http://localhost:6081

LLVM ERROR: Cannot select: intrinsic %llvm.x86.sse41.pblendvb

Create a branch named centos

Waiting we finalize the integration of updated X11 with the image based of centos, I suggest we maintain a branch named centos-2016.10.20

This will allow us to publish an image named thewtex/opengl:centos-2016.10.20 that will be used for Slicer CI.

Ultimately, we will address the remain issues related to update of X11 and get rid of the debian based on .

Cc: @MayeulChassagnard

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.