RealSense running in a windows container
Has anyone build a docker container based on a windows image that runs a realsense application?
mcr.microsoft.com/windows/servercore:ltsc2019
I have made attempts but from what I can tell, the realsense2.dll has dependencies on mf.dll, mfplat.dll mfreadwrite.dll which seem to be part of the windows 10 media pack. I have been unable to find a way to install the media pack on any windows server container.
I would like to use the C# wrapper but my current attempts with this have returned an exception unable to find realsense2.dll or one of its dependencies. My assumption is that my app finds the realsense2.dll, but it is missing a dependency.
One or more errors occurred. (The type initializer for 'Intel.RealSense.Context' threw an exception.)
System.AggregateException: One or more errors occurred. (The type initializer for 'Intel.RealSense.Context' threw an exception.)
---> System.TypeInitializationException: The type initializer for 'Intel.RealSense.Context' threw an exception.
---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)
at Intel.RealSense.NativeMethods.rs2_get_api_version(Object& error)
at Intel.RealSense.Context..cctor()
--- End of inner exception stack trace ---
at Intel.RealSense.Context..ctor()
at ClassLibrary1.RealSense.Test1() in C:\app\ClassLibrary1\RealSense.cs:line 87
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at IotEdgeModule1.Program.Main(String[] args) in C:\app\IotEdgeModule1\Program.cs:line 31
-
Hi Eric I should emphasise upfront that I have not personally used Docker or Windows Server, so the information below is based primarily on my research of your question.
I located a long discussion from 2016 about attempts to install Windows Media Foundation in a Docker container on Windows Server.
At the end of the discussion at the very bottom of the page, a commenter offers details of the method that worked for them.
In addition to those details, they also wrote an article about their method.
http://www.impostorprogrammer.com/articles/docker/media_foundation_windows_containers.html
Please sign in to leave a comment.
Comments
1 comment