{"id":20438160,"url":"https://github.com/yantis/docker-dynamic-video","last_synced_at":"2025-04-12T22:30:03.308Z","repository":{"id":30307093,"uuid":"33858841","full_name":"yantis/docker-dynamic-video","owner":"yantis","description":"Dynamic Video Drivers with X-Server on Docker. (Should work with Mesa \u0026 Nvidia 304.XX, 340.XX, 346.XX, and 349.XX series drivers (All?)) . Includes all 32 bit \u0026 64 bit libraries.","archived":false,"fork":false,"pushed_at":"2016-07-04T18:11:08.000Z","size":25,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T16:38:42.988Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yantis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-13T09:11:14.000Z","updated_at":"2024-02-21T09:38:20.000Z","dependencies_parsed_at":"2022-09-13T18:10:48.439Z","dependency_job_id":null,"html_url":"https://github.com/yantis/docker-dynamic-video","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yantis%2Fdocker-dynamic-video","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yantis%2Fdocker-dynamic-video/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yantis%2Fdocker-dynamic-video/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yantis%2Fdocker-dynamic-video/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yantis","download_url":"https://codeload.github.com/yantis/docker-dynamic-video/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248639636,"owners_count":21137880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T09:09:31.626Z","updated_at":"2025-04-12T22:30:03.272Z","avatar_url":"https://github.com/yantis.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-dynamic-video\nDynamic Video Drivers with optional X-Server on Docker. (Should work with Mesa \u0026 Nvidia 304.XX, 340.XX, and 367.XX series drivers) \nIncludes all 32 bit \u0026 64 bit libraries as well so it should work out of the box with\n[VirtualGL](https://github.com/yantis/docker-virtualgl), Wine, PlayonLinux etc.\n\nThe default mode is to start up the X-Server and SSH daemon but if you start it up with any command it will just default to that and not start up any servers.\nThough if you do not startup any servers you do need to do the first time video initialization yourself. See the local usage section below.\n\nOn Docker hub [dynamic-video](https://registry.hub.docker.com/u/yantis/dynamic-video/)\non Github [docker-dynamic-video](https://github.com/yantis/docker-dynamic-video)\n\n\n### Docker Images Structure\n\u003e[yantis/archlinux-tiny](https://github.com/yantis/docker-archlinux-tiny)\n\u003e\u003e[yantis/archlinux-small](https://github.com/yantis/docker-archlinux-small)\n\u003e\u003e\u003e[yantis/archlinux-small-ssh-hpn](https://github.com/yantis/docker-archlinux-ssh-hpn)\n\u003e\u003e\u003e\u003e[yantis/ssh-hpn-x](https://github.com/yantis/docker-ssh-hpn-x)\n\u003e\u003e\u003e\u003e\u003e[yantis/dynamic-video](https://github.com/yantis/docker-dynamic-video)\n\u003e\u003e\u003e\u003e\u003e\u003e[yantis/virtualgl](https://github.com/yantis/docker-virtualgl)\n\u003e\u003e\u003e\u003e\u003e\u003e\u003e[yantis/wine](https://github.com/yantis/docker-wine)\n\n\n# Description\nThe goal of this was a layer between [ssh-hpn-x](https://github.com/yantis/docker-ssh-hpn-x) and graphical applications.\nThat would just work with whatever video hardware someone had. Right now it defaults to Mesa but if it sees\nthat the host is using an Nvidia driver it will switch over to that one. It should support all Nvidia drivers.\nThis could also easily do the same for ATI but as I don't have one of those cards I am unable to test it.\nYou can fork this and add it yourself or if you send me SSH access to a server with an ATI card I can build it in as well.\n\nIt works well with [VirtualGL](https://github.com/yantis/docker-virtualgl). I have ran Blender as well as even Path of Exile on an Amazon EC2 GPU instance via \n[VirtualGL](https://github.com/yantis/docker-virtualgl) and PlayOnLinux.\nAll in a Docker container. Checkout my Dockerfiles for these (If I didn't get around to putting them up. Just ask.)\n\n\n## Usage (Local)\n\nThis example launches the container and initializes the graphcs with your drivers and in this case\nruns nvidia-smi to get video card information.\n\n```bash\nxhost +si:localuser:$(whoami) \u003e/dev/null\ndocker run \\\n    --privileged \\\n    --rm \\\n    -ti \\\n    -e DISPLAY \\\n    -v /tmp/.X11-unix:/tmp/.X11-unix:ro \\\n    -u docker \\\n    yantis/dynamic-video /bin/bash -c \"sudo initialize-graphics \u003e/dev/null 2\u003e/dev/null; nvidia-smi;\"\n```\n\n### Breakdown\n\n```bash\n$ xhost +si:localuser:yourusername\n```\n\nAllows your local user to access the xsocket. Change yourusername or use $(whoami) or $USER if your shell supports it.\n\n```bash\ndocker run \\\n        --privileged \\\n        --rm \\\n        -ti \\\n        -e DISPLAY \\\n        -v /tmp/.X11-unix:/tmp/.X11-unix:ro \\\n        -u docker \\\n        yantis/dynamic-video /bin/bash -c \"sudo initialize-graphics \u003e/dev/null 2\u003e/dev/null; nvidia-smi;\"\n```\n\nThis follows these docker conventions:\n\n* `-ti` will run an interactive session that can be terminated with CTRL+C.\n* `--rm` will run a temporary session that will make sure to remove the container on exit.\n* `-e DISPLAY` sets the host display to the local machines display.\n* `-v /tmp/.X11-unix:/tmp/.X11-unix:ro` bind mounts the X11 socks on your local machine to the containers and makes it read only.\n* `-u docker` sets the user to docker. (or you could do root as well)\n* `yantis/dynamic-video /bin/bash -c \"sudo initialize-graphics \u003e/dev/null 2\u003e/dev/null; nvidia-smi;\"`\nyou need to initialize the graphics or otherwise it won't adapt to your graphics drivers and may not work.\n\n\n## Usage (Remote)\n\nThis example launches the container in the background.\nWarning: Do not run this on your primary computer in remote mode as it will launch another X server that take over\nyour video cards and you will have to shutdown the container to get them back.\n\n```bash\ndocker run \\\n        --privileged \\\n        -d \\\n        -v /home/user/.ssh/authorized_keys:/authorized_keys:ro \\\n        -h docker \\\n        -p 49154:22 \\\n        yantis/dynamic-video\n```\n\nThis follows these docker conventions:\n\n* `--privileged` run in privileged mode \nIf you do not want to run in privliged mode you can mess around with these:\n\nAWS `--device=/dev/nvidia0:/dev/nvidia0` \\  \n      `--device=/dev/nvidiactl:/dev/nvidiactl` \\  \n      `--device=/dev/nvidia-uvm:/dev/nvidia-uvm` \\  \n\nOR (Local) `--device=/dev/dri/card0:/dev/dri/card0` \\\n\n* `-d` run in daemon mode\n* `-h docker` sets the hostname to docker. (not really required but it is nice to see where you are.)\n* `-v $HOME/.ssh/authorized_keys:/authorized_keys:ro` Optionaly share your public keys with the host.\nThis is particularlly useful when you are running this on another server that already has SSH. Like an \nAmazon EC2 instance. WARNING: If you don't use this then it will just default to the user pass of docker/docker\n(If you do specify authorized keys it will disable all password logins to keep it secure).\n\n* `-p 49158:22` port that you will be connecting to.\n* `yantis/dynamic-video` the default mode is SSH server with the X-Server so no need to run any commands.\n\nNow just SSH into it and use it (See [docker-virtualgl](https://github.com/yantis/docker-virtualgl) for how to access it and usage etc.)\n\n\n# Tested\n* Macbook Retina with Mesa drivers.\n\n* Nvidia 349.xx OK  (Current Beta Drivers)\n![](http://yantis-scripts.s3.amazonaws.com/screenshot_20150412-070107.jpg)\n\n* Nvidia 346.xx OK  (Current Generation Drivers) (This one is an Amazon EC2 GPU instance)\n![](http://yantis-scripts.s3.amazonaws.com/screenshot_20150412-071934.jpg)\n\n* Nvidia 340.xx OK (Previous Generation Drivers)\n![](http://yantis-scripts.s3.amazonaws.com/screenshot_20150412-071443.jpg)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyantis%2Fdocker-dynamic-video","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyantis%2Fdocker-dynamic-video","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyantis%2Fdocker-dynamic-video/lists"}