dockerx | Python script to launch a container with X11 graphics | Continuous Deployment library
kandi X-RAY | dockerx Summary
kandi X-RAY | dockerx Summary
This repository contains a Python script that allows you to launch a docker container with X11 graphics support.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Launch a container
- Prepares the Docker environment
- Return the type of an X11 server socket
- Get the IP address from display
- Returns the IP address of an interface
- Run a shell command
- Get port offset from display
- Creates a touch command
- Check if an interface exists
- List of available interfaces
- Get port from display
- Check if xhost is available
- Parse command line arguments
- Return the message for a given parameter
- Parse volume list
- Parse command line arguments
dockerx Key Features
dockerx Examples and Code Snippets
$ python3 -m dockerx.run --image --nvidia <0 or 1> --command
$ python3 -m dockerx.run --image nvidia/cuda:11.0-base --nvidia 1 --command '/bin/bash -c "apt update && apt install -y x11-apps && xclock"'
$ python3 -m dockerx.r
import dockerx
dl = dockerx.DockerLauncher()
# If no command is specified here, the CMD in your Dockerfile will be executed, if there is no CMD in your
# Dockerfile either, then this container will be created and immediately destroyed
container_0
$ sudo apt install python3 python3-pip
$ python3 -m pip install docker argparse --user
$ git clone https://github.com/luiscarlosgph/dockerx.git
$ cd dockerx
$ python3 setup.py install --user
Community Discussions
Trending Discussions on dockerx
QUESTION
I'm trying to acess webcam from docker image. My permissions:
...ANSWER
Answered 2020-May-29 at 12:20Add the privileged option docker run --privileged
. If it still doesn't work you may also consider mounting /dev/video
From the docs
by default a container is not allowed to access any devices, but a “privileged” container is given access to all devices (see the documentation on cgroups devices)
Also this answer is similar Docker: How to avoid Operation not permitted in Docker Container?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dockerx
You can use dockerx like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page