Code does not work in EKS linux host
- Dominant language
- No language data
- Stars
- 4.8k
- Forks
- 6.1k
- Avg merge
- 19h 10m
- Merged PRs (30d)
- 268
Description
### Type of issue
Code doesn't work
### Description
[Background: This code runs well in visual studio 2022 professional (both windows and macOS) and as well as in if .Net 6 web api is deployed in IIS on windows server. But it does not work for kestrel server and deployed in Elastic Kubernetes service(EKS) with Linux as a host OS.
Limitation: 1. The path dependency while loading the training model. _mlContext.Model.Load(string trainedmodelpath, out modelschema);
2. The path from where training images are fed to generate the trained model is somehow have dependency on same path when images used for prediction. So, when our web api is deployed in EKS behind Kestrel server then it really does not work as it cannot find either System.AppDomain.CurrentDomain.BaseDirectory or System.Environment.CurrentDirectory.
Code: predictor.Predict(imageData);
Severity: This is now blocker for us for EKS deployment
3. Even for windows server, We have to load the trained model again else it throws corrupts memory access for subsequent second request and application just shuts down.
]
### Page URL
https://learn.microsoft.com/en-us/dotnet/machine-learning/tutorials/image-classification
### Content source URL
https://github.com/dotnet/docs/blob/main/docs/machine-learning/tutorials/image-classification.md
### Document Version Independent Id
c8a996eb-82ed-a4bd-94d8-ef0b32158c67
### Article author
@luisquintanilla
### Metadata
* ID: 7ca0a402-fa67-fbd4-4cbc-604b4b59c97c
* Product: **dotnet-ml**
Contributor guide
Assessment
This issue has not been assessed yet.