Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access camera stream on Docker Image in WSL2 #760

Open
adennaoui97 opened this issue Dec 19, 2024 · 0 comments
Open

Access camera stream on Docker Image in WSL2 #760

adennaoui97 opened this issue Dec 19, 2024 · 0 comments

Comments

@adennaoui97
Copy link

adennaoui97 commented Dec 19, 2024

I will try to make it simple.
I am able to make WSL2 recognize the Intel Realsense camera using usbipd then I built an alternative vmlinux (wsl2 kernel) with multimedia support and replaced it with the existing kernel.
With these changes, I am able to make WSL2 both detect the usb ports (lsusb) and I see /dev/video* and I can get access to video stream (I used cheese for example, and it worked).
When I try to run the Docker image, I bash this file:

docker rm -f foundationpose
DIR=$(pwd)/../
xhost +  # Allow GUI access

docker run --gpus all --env NVIDIA_DISABLE_REQUIRE=1 -it --network=host --name foundationpose \
    --cap-add=SYS_PTRACE \
    --cap-add=SYS_ADMIN \
    --device=/dev/bus/usb:/dev/bus/usb \
    --privileged \
    --security-opt seccomp=unconfined \
    -v $DIR:$DIR \
    -v /home:/home \
    -v /mnt:/mnt \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v /tmp:/tmp \
    --ipc=host \
    -e DISPLAY=${DISPLAY} \
    -e GIT_INDEX_FILE \
    foundationpose:latest \
    bash -c "cd $DIR && bash"

When I had my work computer that has Ubuntu, this was perfect to get things going so I expected things to be fine now that I use WSL2 on Windows once I solved the camera stream issue on WSL2 but the Docker image does not get it. I can see /dev/video* inside the image, I can see Intel Realsense in the list when I run 'lsusb' but when I launch cheese, I do not get the camera stream.

Anybody had this issue before and how to solve it?

PS: I use WSL integration on Docker Desktop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant