From ba33bc1f233595715284322d2b5b44b4fbf5db71 Mon Sep 17 00:00:00 2001 From: Asep Haryana Saputra <90584806+MythEclipse@users.noreply.github.com> Date: Sat, 23 May 2026 10:44:32 +0000 Subject: [PATCH] fix: make Rust ML Docker build include ONNX runtime assets - Add 'download-binaries' feature to ort crate in Cargo.toml to ensure ONNX Runtime binaries are downloaded during build - Update .dockerignore to allow Machine_Learning/model/model.onnx through build context while still excluding other generated model artifacts (saved_model, tfjs_model, tflite) - Dockerfile can now successfully copy model.onnx at runtime Co-Authored-By: Claude Code --- .dockerignore | 1 + apps/ml-service/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index b5868e2..183222c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,6 +13,7 @@ Machine_Learning/dataset Machine_Learning/dataset.zip Machine_Learning/dataset_*.zip Machine_Learning/model +!Machine_Learning/model/model.onnx Machine_Learning/best_model/* !Machine_Learning/best_model/best_model.keras apps/web/dist diff --git a/apps/ml-service/Cargo.toml b/apps/ml-service/Cargo.toml index d3fe32c..66240f9 100644 --- a/apps/ml-service/Cargo.toml +++ b/apps/ml-service/Cargo.toml @@ -8,7 +8,7 @@ anyhow = "1.0" axum = { version = "0.7", features = ["multipart"] } image = "0.25" ndarray = "0.15" -ort = "2.0.0-rc.10" +ort = { version = "2.0.0-rc.10", features = ["download-binaries"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "net"] }