Install ONNX Runtime (ort) in Sandbox

Install ONNX Runtime static libraries for the ort crate in sandboxed environments.

48|10|Updated Oct 3, 2024
One-click install
npx skills add https://github.com/acornprover/acorn --skill install-onnx-runtime-ort-in-sandbox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Install ONNX Runtime (ort) in Sandbox
Source: https://github.com/acornprover/acorn/tree/main/.claude/skills/install-ort
Command: npx skills add https://github.com/acornprover/acorn --skill install-onnx-runtime-ort-in-sandbox

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill resolves build failures in sandboxed environments where the ort-sys crate cannot automatically download ONNX Runtime static libraries due to TLS certificate issues.

Core Features & Use Cases

  • Manual Download & Install: Provides steps to manually download and extract the necessary ONNX Runtime libraries.
  • Environment Variable Configuration: Guides on setting the ORT_LIB_LOCATION environment variable to point the build script to the pre-downloaded libraries.
  • Use Case: When building a Rust project that depends on the ort crate within a CI/CD pipeline or a restricted development environment, this skill ensures the build process completes successfully by bypassing download errors.

Quick Start

Manually download the ONNX Runtime libraries to /tmp/ort-lib and set the ORT_LIB_LOCATION environment variable before running your cargo command.

Frequently Asked Questions about Install ONNX Runtime (ort) in Sandbox

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does the ort-sys crate fail to build in a sandboxed environment?

The ort-sys crate fails to build in a sandboxed environment because its build script cannot automatically download ONNX Runtime static libraries due to TLS certificate errors. This skill resolves the issue by providing manual download and configuration steps.

How do I manually install ONNX Runtime libraries for the Rust ort crate?

To manually install ONNX Runtime libraries for the Rust ort crate, download and extract the necessary static libraries to a local directory like /tmp/ort-lib. This bypasses TLS download errors during the ort-sys build process.

How do I configure ORT_LIB_LOCATION to fix ort-sys build failures?

Configure ORT_LIB_LOCATION by setting the environment variable to point to your pre-downloaded ONNX Runtime libraries directory, such as /tmp/ort-lib, before running your cargo command. This directs the ort-sys build script to the local files.

Can I use the ort crate in a CI/CD pipeline with restricted network access?

Yes, you can use the ort crate in a CI/CD pipeline with restricted network access by manually downloading ONNX Runtime static libraries and setting the ORT_LIB_LOCATION environment variable. This ensures successful compilation without relying on automatic downloads.

What are the limitations of manually configuring ONNX Runtime for Rust projects?

The limitation of manually configuring ONNX Runtime for Rust projects is that you must manually manage and provide the correct static library versions in your sandboxed environment. The ort-sys crate will not handle downloading or updating the libraries automatically in restricted settings.