Technica-Corporation / Tegra-Docker

Instructions and key files to enable Docker support on NVIDIA Tegra devices, specifically the TX-2.
Apache License 2.0
234 stars 61 forks source link

one question #2

Closed BH1SCW closed 6 years ago

BH1SCW commented 6 years ago

First Thanks for sharing. I can run devece query in docker following your guide step by step. My question is how to run gui sample in docker, for example nbody.

I got log as: x error of failed request bad value

any suggestion? BR

kgdad commented 6 years ago

BR,

It is possible to run GUI applications in docker using this method. Couple things you'll have to add:

So to display a simple example like xeyes, your Dockerfile would look like: `FROM arm64v8/ubuntu:16.04

RUN apt-get update RUN apt-get install -qqy x11-apps ENV DISPLAY :0

CMD xeyes`

This however, won't solve your problem of attempting to run something like nbody in a container. Nbody, and I think all the other samples that come with CUDA, all use OpenGL. As far as I know OpenGL will not run directly from a container. I believe you will need to use something like VirualGL. This should be possible within the Docker framework on the TX-2 but would need someone to take the time to figure out the details. Unfortunately, we are working on some other items right now that don't directly relate to this but I will put it on our to-do list. If someone has some time to look at this, it would be great to figure out the details and document them for the community.

MikeWise2718 commented 6 years ago

Actually it looks like OpenGL will run directly on the Jetson TX2 from a docker container. I built on the information and samples in this excellent repository to accomplish that with minor modifications - much easier than the above post suggests (although that might be a better way to do things).

The files I used can be found here

kgdad commented 6 years ago

Awesome! Looks like the missing piece is --net=host.

Will update tx2-docker accordingly. Also going to update so that the LD_LIBRARY_PATH gets set with the required libraries in tx2_docker automatically so you don't have to remember to set each time in your dockerfile.

kgdad commented 6 years ago

Updated instructions and tx2-docker script with ability to run GUI apps

BH1SCW commented 6 years ago

Awesome! Greate thanks ! it works!!!!