Jevgenij Nekrasov
Jevgenij Nekrasov

Reputation: 2760

CNTK on Azure Function

I have simple azure function

public async Task Run(
    [ServiceBusTrigger(
        "%TopicName%",
        "%SubscriptionName%",
        Connection = "ServiceBusConnection")]
    Message input,
    ILogger logger)
{
    var device = CNTK.DeviceDescriptor.CPUDevice;
    Console.WriteLine(device);
}

Function uses simple call to CNTK library 2.6. Function is targeting x64 platform.

<Platforms>AnyCPU;x64</Platforms>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

Everything is working locally, but when I deploy on azure it fails with an exception:

System.TypeInitializationException: The type initializer for 'CNTK.CNTKLibPINVOKE' threw an exception. 
    ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. 
    ---> System.DllNotFoundException: Unable to load DLL 'Cntk.Core.CSBinding-2.6.dll' or one of its dependencies: The specified module could not be found.

Function app in azure is also set to 64bit platform.

Any suggestions?

Upvotes: 1

Views: 71

Answers (0)

Related Questions