-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Linux .Net - Unable to load shared library 'Cntk.Core.CSBinding-2.6.dll' #3472
Comments
I am developing on Windows and getting the same issue DllNotFoundException: Unable to load DLL 'Cntk.Core.CSBinding-2.6.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) |
Same on Windows for the nightly build: Unable to load DLL 'Cntk.Core.CSBinding-2.7-rc0.dev20181116.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) |
@waynemunro @aaad on Windows the issue happens because you need to separately install the CNTK binaries (or add the binaries to your project itself) as the NuGet package only contains the managed portion of the framework. See https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Windows-Binary-Script @foldedwave I'm faced with the same issue; trying to run CNTK in a Linux based Docker container based on Microsoft's CNTK image. The problem is that P/Invoke is trying to link against the Windows .dll instead of the Linux .so file. Have you tried installing the 2.7 preview and try to run against that? |
@foldedwave Okay, so apparently for Linux, instead of the NuGet package you want to download the complete Linux binary package and use the managed DLL from that. You can grab it at https://github.com/Microsoft/CNTK/releases |
Though the error remains somehow, even if I add the .so files to the project. Fairly sure my container should also have the files since it's the CNTK image |
It seems DLLImport doesn't seem to find the CNTK libraries even though they are on the LD_LIBRARY_PATH:
The error message is rather weird though - what's the random .so.so? Anyway, this is using the official docker image for CNT 2.6 Python 3 CPU-Only |
I'm having the same issue trying to get the CNTK C# interface working on the CNTK docker, did you find a solution? All though my error references the DLL rather than so. System.DllNotFoundException : Unable to load shared library 'Cntk.Core.CSBinding-2.6.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libCntk.Core.CSBinding-2.6.dll: cannot open shared object file: No such file or directory |
No, personally I ended up using Python in a docker container with Tensorflow backend since CNTK simply wouldn't work - but I could only do this since I was using Keras in the first place. |
I faced the same error while trying to use CNTK with dotnet core 3.0 on linux and finally, the following procedure worked: Install Open MPI following Step 1 from Setup Linux Binary Manual (https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Linux-Binary-Manual):
Download CNTK linux release from https://github.com/Microsoft/CNTK/releases and add lib directories in $LD_LIBRARY_PATH (eg in
Build project targeting x64 platform:
Project should now run with |
same error on windows just using Nuget pkg,setting the Architecture from anyCpu to x64 fixed it |
For future reference, i had the same issue vor v 2.8 (2.8.0-rc0.dev20200201) on Ubuntu 20.04 LTS. I needed to compile opemmpi from source as pointed out by @kikniknik and download the cntk libraries as well (basically follow these steps: https://docs.microsoft.com/en-us/cognitive-toolkit/setup-cntk-on-linux#open-mpi) make sure to install g++ AND make before trying to compile the binaries. The problem was still not solved, also using the rename hint did not work. What does work for me is renaming the So on linux that makes the following steps:
For windows you just need to set a configuration for x64 on solution level and reference the nuget package. |
I am having issues running any CNTK programs on linux using .net core.
Steps to reproduce
dotnet new console
dotnet add package CNTK.CPUOnly
dotnet run
Expected output
Program completes successfully.
Actual Output
Impact
Cannot develop using .net on Linux.
Notes
I have tried adding the following to the csproj file, inside the propertygoup element, to ensure the app runs in 64bit
<Platforms>x64</Platforms>
The text was updated successfully, but these errors were encountered: