Closed gitdeath closed 9 months ago
Hi,
this image: ndouba/device-mapping-manager does not exist. you have to compile it locally, before run the docker compose.
have a look in the build.sh script: https://github.com/allfro/device-mapping-manager/blob/master/build.sh
Attaching to compose_files-dmm-1
compose_files-dmm-1 | Unable to find image 'ndouba/device-mapping-manager:latest' locally
if you have a local image registry:
git clone https://github.com/allfro/device-mapping-manager.git
cd device-mapping-manager
docker buildx build --push --platform linux/amd64 --tag my.registry.local:5000/device-mapping-manager .
and the compose I use. take note i deploy the image in global mode for all my Swarm node. It's not mandatory, could be deploy only on 1 node, but my case require for all.
version: "3.9"
services:
dmm:
image: docker
entrypoint: docker
command: |
run
-i
--rm
--name device-manager
--privileged
--cgroupns=host
--pid=host
--userns=host
-v /sys:/host/sys
-v /var/run/docker.sock:/var/run/docker.sock
my.registry.local:5000/device-mapping-manager
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global
placement:
max_replicas_per_node: 1
constraints: [node.platform.os == linux]
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: any
delay: 10s
max_attempts: 0
window: 10s
once deploy, have a look on the log file of the DMM container, you will see when the other container need to access to a device like /dev/dri for example, the CGROUP will be changed.
Thank you. I'm running now.
I'm having a real challenge trying to understand how to use this capability.
yml in use
If I run a local compose I get this error, which is the same error I get if I try to run a stack.
I've tried with the plugin installed and not installed it doesn't seem to make a difference.
Just doing a pull results in: