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

Cannot use ML.NET in a Windows nano container #1823

Closed
swesonga opened this Issue Dec 5, 2018 · 3 comments

Comments

Projects
5 participants
@swesonga

swesonga commented Dec 5, 2018

System information

Base image: microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-1803

Microsoft Windows [Version 10.0.17134.345]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\app>dotnet --info

Host (useful for support):
Version: 2.1.5
Commit: 290303f510

.NET Core SDKs installed:
No SDKs were found.

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Issue

Repro: Install the Visual Studio Service Fabric Mesh tools from https://blogs.msdn.microsoft.com/azureservicefabric/2018/12/04/service-fabric-mesh-preview-refresh-release/ then follow the tutorial at https://docs.microsoft.com/en-us/azure/service-fabric-mesh/service-fabric-mesh-tutorial-create-dotnetcore and install the ML.NET package to try training an ML model.

When the web project starts, a System.InvalidOperationException is thrown.
Inner Exception
DllNotFoundException: Unable to load DLL 'CpuMathNative' or one of its dependencies: The specified module could not be found.

@swesonga swesonga changed the title from Cannot use ML.NET in a Windows nano to Cannot use ML.NET in a Windows nano container Dec 5, 2018

@singlis

This comment has been minimized.

Member

singlis commented Dec 5, 2018

@swesonga Thank you for reporting this. I am not familiar the Windows Nano image. Is this by chance a 32-bit or ARM based? We currently only support 64-bit, but do have plans to support other platforms.

@eerhardt

This comment has been minimized.

Member

eerhardt commented Dec 5, 2018

I investigated this today. It appears the issue is that we are dynamically linking to the VC++ Runtime, which is not available on Windows Nano (and it isn't installed on "normal" users machines either).

The fix is simple (once you know what to do). We should be statically linking against the VC++ Runtime (using the /MT compile flag). I missed this when I first set up the native build code.

@eerhardt eerhardt self-assigned this Dec 5, 2018

@eerhardt

This comment has been minimized.

Member

eerhardt commented Dec 5, 2018

@singlis - FYI we do now support 32-bit on Windows.

Windows Nano is the "small" Windows docker container technology: https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-10

eerhardt added a commit to eerhardt/machinelearning that referenced this issue Dec 5, 2018

Allow ML.NET native binaries to work on Windows machines that don't h…
…ave the VC runtime installed.

This allows ML.NET to run on Windows Nano containers.

I also ported 2 Unix compile options we are using in core-setup and corefx that were missed when originally creating the ML.NET native build infrastructure.

Fix dotnet#1823

eerhardt added a commit to eerhardt/machinelearning that referenced this issue Dec 5, 2018

Allow ML.NET native binaries to work on Windows machines that don't h…
…ave the VC runtime installed.

This allows ML.NET to run on Windows Nano containers.

I also ported 2 Unix compile options we are using in core-setup and corefx that were missed when originally creating the ML.NET native build infrastructure.

Fix dotnet#1823

eerhardt added a commit that referenced this issue Dec 5, 2018

Allow ML.NET native binaries to work on Windows machines that don't h…
…ave the VC runtime installed. (#1828)

This allows ML.NET to run on Windows Nano containers.

I also ported 2 Unix compile options we are using in core-setup and corefx that were missed when originally creating the ML.NET native build infrastructure.

Fix #1823

@shauheen shauheen added the Build label Dec 5, 2018

@shauheen shauheen added this to Done in v0.9 Dec 5, 2018

@shauheen shauheen added this to the 1218 milestone Dec 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment