@Override
    public void start(BundleContext ctx) {
        String skipAll = OnnxBundleActivator.class.getSimpleName() + SKIP_SUFFIX;
        if (SKIP_VALUE.equals(System.getProperty(skipAll))) {
            log.fine("skip loading of native libraries");
            return;
        }
        System.setProperty(ONNX_PREFIX + PATH_SUFFIX, "/opt/vespa-deps/lib64");
        for (String libName : LIBRARY_NAMES) {
            String skipProp = ONNX_PREFIX + libName + SKIP_SUFFIX;
            if (SKIP_VALUE.equals(System.getProperty(skipProp))) {
                log.fine("already loaded native library "+libName+", skipping");
            } else {
                log.fine("loading native library: "+libName);
                try {
                    System.loadLibrary(libName);
                    // this property also signals onnxruntime to skip loading:
                    System.setProperty(skipProp, SKIP_VALUE);
                    log.fine("loaded native library OK: "+libName);
                } catch (Exception|UnsatisfiedLinkError e) {
                    log.info("Could not load native library '"+libName+"' because: "+e.getMessage());
                }
            }
        }
    }
@author arnej
Loads native libraries when the bundle is activated.
Use system properties to ensure onnxruntime won't try
to load them itself.
container-onnxruntime/src/main/java/ai/vespa/onnxruntime/OnnxBundleActivator.java