google / magika

Detect file content types with deep learning
https://google.github.io/magika/
Apache License 2.0
8.42k stars 435 forks source link

Cross platform build failures #824

Open andrejohansson opened 2 months ago

andrejohansson commented 2 months ago

We have a cross platform build job for our rust app, it builds on the following targets but fails on windows and linux after I started to use the magika crate.

According to the platform support page there should be precompiled binaries for all platforms. But I assume they are not for the windows-gnu variant then. For windows-gnu https://github.com/pykeio/ort/issues/189) says there is no support but I should be able to use the msvc binaries.

Where can I find these and how do I use them?

reyammer commented 2 months ago

Thanks for reporting!

@ia0 thoughts on this?

ia0 commented 2 months ago

The ort documentation is the reference on that matter. As they suggest, you can compile ONNX Runtime yourself (and either link it dynamically or statically). We actually do this when releasing the CLI (see https://github.com/google/magika/blob/main/.github/workflows/python-build-package.yml and https://github.com/google/magika/blob/main/rust/onnx/build.sh#L36-L37) which depends on the library as any other user would. If you believe something is missing in the library or it is preventing your use-case in some way, then we can fix it. But so far it seems the problem is that Pyke doesn't provide precompiled binaries for your platform, which is inconvenient and requires more work on your side.

reyammer commented 2 months ago

@andrejohansson, any news on this? is anything still unclear or we can close this one? Thanks!