Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example to run OpenStudio GUI from container #1

Open
pachi opened this issue Jul 8, 2016 · 4 comments
Open

Add example to run OpenStudio GUI from container #1

pachi opened this issue Jul 8, 2016 · 4 comments

Comments

@pachi
Copy link

pachi commented Jul 8, 2016

This allows to run a docker instance that can be used to launch the OpenStudio GUI:

$ xhost local:root && \
    docker run -it \                                                     
    --rm \
    -e DISPLAY \
    -v /tmp/X11-unix:/tmp/X11-unix:ro \
    -v /etc/machine-id:/etc/machine-id:ro \
    -v /var/run/dbus:/var/run/dbus \
    nrel/openstudio

To launch the OpenStudio GUI from the container, just use:

/var/simdata/openstudio# QT_GRAPHICSSYSTEM=native OpenStudio

Exporting the QT_GRAPHICSSYSTEM=native is needed to overcome a rendering bug due to running the app through the X socket. Using -e QT_GRAPHICSSYSTEM=native to set this environment variable doesn't seem to work.

@nllong
Copy link
Member

nllong commented Oct 31, 2016

i don't think we have x11 installed on these images, do we?

@pachi
Copy link
Author

pachi commented Nov 2, 2016

That's why the X display, the X11 and dbus sockets are exported to the container, to be able to work with the host's X11. These are the relevant lines:

    -e DISPLAY \
    -v /tmp/X11-unix:/tmp/X11-unix:ro \
    -v /etc/machine-id:/etc/machine-id:ro \
    -v /var/run/dbus:/var/run/dbus \

But you can try and see it working ;)

@myndtrust
Copy link

I am trying to run OS 3.1.0 in Docker on Ubuntu 20.04. Can I access the GUI from the container there still? So far I have been successful in getting the CLI to run but am not able to run the the GUI.

Once I run the above commands - how do I access the X11 (I am not familiar with X11 operations).

@tijcolem
Copy link
Contributor

@myndtrust Are you trying to install the OS App v1.1.0 .deb packages from https://github.com/openstudiocoalition/OpenStudioApplication/releases/tag/v1.1.0 and then get X11 to work with the docker container? The deb package from https://github.com/NREL/OpenStudio/releases/tag/v3.1.0 is the OS CLI only as of v3.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants