4 ms·
This may be a noob question, I'm looking into using containers for ui applications. I need to access GPU within the application. is this doable with Rocket or
by billconan 12y ago
This may be a noob question,
I'm looking into using containers for ui applications. I need to access GPU within the application. is this doable with Rocket or Docker?
Also does Rocket have to be used with CoreOS?
- pron 12y agoI'm interested: why do you need a container for a UI application? It would be better for your users if it could run as a simple process.
- billconan 12y agoI actually need gpu, not the ui. I need it to do scientific computation. Video streaming service is another case. gpu has better video encoding capabilities. I previously heard that docker has trouble loading device drivers.
- tedreed 12y agoNot the parent poster, but needing GPU isn't necessarily the same as having UI. You can use GPU for a variety of general purpose math (Example: mining bitcoins, or doing stuff like Folding@Home), or for offline rendering.
- billconan 12y agoyes, I understand offline rendering. I'm looking into egl off screen rendering. But due to historical reason, the current gpu drivers (NVIDIA) need x server.
- pipeep 12y agoCertainly. The kernel can simply pass through the device, although you lose some of the security of containerization that way. There may be issues with multiple containers sharing the same GPU though.
- billconan 12y agoI indeed need multiple containers to share the same gpu. :(
- wmf 12y agoGNOME is working on sandboxing + application packaging that's basically containers under a different name. http://blogs.gnome.org/aday/2014/07/10/sandboxed-applications-for-gnome/ http://blogs.gnome.org/aday/2014/07/10/sandboxed-application... http://blogs.gnome.org/uraeus/2014/07/10/desktop-containers-the-way-forward/ http://blogs.gnome.org/uraeus/2014/07/10/desktop-containers-... http://www.superlectures.com/guadec2013/sandboxed-applications-for-gnome http://www.superlectures.com/guadec2013/sandboxed-applicatio...
- billconan 12y agothank you very much. I will take a look. but the fact that this is tied to Gnome worries me. I actually need a console application with gpu access.
- wmf 12y agoAh, in that case Docker may be a better choice. You can (probably?) use volumes to expose /dev/drm and such into the container.
- jambay 12y agono, rocket does not require coreos, just linux, see: https://github.com/coreos/rocket#trying-out-rocket https://github.com/coreos/rocket#trying-out-rocket
- ozzyjohnson 12y agoHave a look at this container [1] I put together for accessing GPU instances on AWS via Docker. Runs various compute tasks including multiple containers against a single GPU without issue. From the looks of your other comments in this tangent it might be exactly what you need or a starting point at least. It's a base for these BOINC [2] and F@H [3] containers. 1: https://registry.hub.docker.com/u/ozzyjohnson/cuda/ https://registry.hub.docker.com/u/ozzyjohnson/cuda/ 2: https://registry.hub.docker.com/u/ozzyjohnson/boinc-gpu/ https://registry.hub.docker.com/u/ozzyjohnson/boinc-gpu/ 3: https://registry.hub.docker.com/u/ozzyjohnson/cuda-fah/ https://registry.hub.docker.com/u/ozzyjohnson/cuda-fah/
- billconan 12y agoThank you very much! this is really useful information. Aside from cuda, I also want to make EGL/opengl work with docker, hopefully I can find examples for that.