Docker image for using SR300
| Required Info | |
|---|---|
| Camera Model | { SR300 } |
| Firmware Version | |
| Operating System & Version | Linux |
| Kernel Version (Linux Only) | |
| Platform | |
| SDK Version |
Issue Description
I wonder if there's any ready to use docker image for using SR300 and D400 series. If I need to do it myself, how do I enable the realsense device in the container ? Thanks!
[Realsense Customer Engineering Team Comment] hi @blackball,
can you please explain more about docker image you mean? thanks.
I wonder how I can use SR300 inside a docker container, because my host OS doesn't have a matched kernel with SR300's driver.
[Realsense Customer Engineering Team Comment] hi @blackball,
we don't have experience with docker, so maybe you can share your experience about building libRealsense on it? and which OS is your host OS? maybe we have something under /doc that you can refer to patch kernel or provide you some ideas.
[Realsense Customer Engineering Team Comment] Hello @blackball,
There is no ready to use docker image for RealSense Cameras. Docker does not provide access to the USB devices on the host system. If you insist on creating a virtual environment you may use a virtual machine. VMware Workstation Player works in emulating USB 3 layers, just be sure to add USB 3 devices to image prior to booting. Also note virtual machines are NOT recommended by RealSense team as this additional layer can impact the camera performance.
See this link for more details: https://github.com/IntelRealSense/librealsense/wiki/Troubleshooting-Q%26A#q-im-using-a-virtual-machine-and-the-camera-is-not-working
Thank you,
Nate W.
@RealSense-Customer-Engineering
"Docker does not provide access to the USB devices on the host system." This is not true.
[Realsense Customer Engineering Team Comment] Hello Blackball,
With our initial research and testing, Docker requires additional steps within operating systems to add USB devices. If you are able to setup and run RealSense cameras on Docker please feel free to provide that information to this community. Of the Virtual Machine solutions, VMWare Workstation Player works the best in emulating USB 3 layers out of box; all that is needed is adding USB 3.0 usage prior to booting image. Again RealSense team does NOT recommend virtual machines because even on the best working emulator, USB 3.0 performance is severely decreased.
If you search on google, you can immediately find docker image for R200: https://hub.docker.com/r/mjenz/ros-realsense/.
@blackball Blackball, I want to thank you for your question, we were able to create a docker image with LibRealSense samples. You can try following directions posted here, along with pulling our docker container: https://hub.docker.com/r/speechtesting11/ubuntu16.04_lrs3/ Docker pull command: sudo docker pull speechtesting11/ubuntu16.04_lrs3
SR300 was tested and is able to run with app RealSense Viewer along with D400 series cameras. Please let us know if you have any other questions. Thank you.
@njwardx
Thanks for working on this issue. I followed steps in the docker hub page. The RGB camera worked out of the box, but not the depth part.
Backend in rs2_open_multiple(sensor:0x7f6cc4000f80, profiles:0x7f6cc4317470, count:1): The requested pixel format 'INZI' is not natively supported by the Linux kernel and likely requires a > patch! Alternatively please upgrade to kernel 4.12 or later. Last Error: Inappropriate ioctl for device
Seems I need to patch the kernel.
[Realsense Customer Engineering Team Comment] hi @blackball,
yes, from the message, you need to patch your kernel.
@njwardx can you provide the Dockerfile for the linked image? I'm really curious how the USB device is passed to the container!
@Transmitt0r I didn't use a dockerfile I simply installed docker on Ubuntu and pulled Ubuntu base image and built LRS SDK with these commands:
sudo docker pull ubuntu
xhost local:root
sudo docker run ubuntu
sudo docker run -it ubuntu
Followed instructions here: https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md
Thank you.
Here is the Dockerfile I built, if someone stumbles over this. I use it to run a Python 3.6 application with a GUI https://gist.github.com/Transmitt0r/698dac6946fd43be19b8f799f82f326e
[Realsense Customer Engineering Team Comment] thanks @Transmitt0r for sharing. hi @Blackball, do you need more support on this topic?
@RealSense-Customer-Engineering No, Thanks.
Here is the Dockerfile I built, if someone stumbles over this. I use it to run a Python 3.6 application with a GUI https://gist.github.com/Transmitt0r/698dac6946fd43be19b8f799f82f326e
@Transmitt0r - do you still have the dockerfile available? Looks like the link above is dead.
Does not work on macos. Still cannot identify the device ...
@blackball Blackball, I want to thank you for your question, we were able to create a docker image with LibRealSense samples. You can try following directions posted here, along with pulling our docker container: https://hub.docker.com/r/speechtesting11/ubuntu16.04_lrs3/ Docker pull command: sudo docker pull speechtesting11/ubuntu16.04_lrs3
SR300 was tested and is able to run with app RealSense Viewer along with D400 series cameras. Please let us know if you have any other questions. Thank you.
Would it be possible for you to share the parts of the Dockerfile that allowed to you install the RealSense2 library please?
For future travelers....
- Add apt sources for librealsense packages
- On the host, install librealsense2-dkms
- In the container, install everything else
- Run the container (docker run) with --priveleged and -v /dev/:/dev/ with /bin/bash or whatever app you want to run at the end
- If you're in a bash shell, try
rs-fw-update -l - ?????
- Profit