Have you tried ML.NET?
It's a new machine learning framework made specifically for .NET developers.

.NET Tutorial - Hello World Microservice

Add Docker metadata

To run with Docker Image you need a Dockerfile — a text file that contains instructions for how to build your app as a Docker image. A docker image contains everything needed to run your app as a Docker container.

Return to app directory

Since you opened a new command prompt in the previous step, you'll need to return to the directory you created your service in.

Since you opened a new terminal in the previous step, you'll need to return to the directory you created your service in.

Command prompt
cd myMicroservice

Add a DockerFile

Create a file called Dockerfile with the following content in a text editor:

Dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
COPY myMicroservice.csproj .
RUN dotnet restore
COPY . .
RUN dotnet publish -c release -o /app

FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["dotnet", "myMicroservice.dll"]

Note: Make sure to name the file as Dockerfile and not Dockerfile.txt or some other name.

Optional: Add a .dockerignore file

A .dockerignore file reduces the set of files that are used as part of `docker build`. Fewer files will result in faster builds.

Create a file called .dockerignore file (this is similar to a .gitignore file if you are familiar with those) with the following content in a text editor:

.dockerignore
Dockerfile
[b|B]in
[O|o]bj
Continue