microsoft / microsoft/onnxruntime

Javascript Node Alpine

Open
#9,483 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 8h
Merged PRs (30d)
179

Description

Is your feature request related to a problem? Please describe.

The library is not prebuilt to alpine systems

System information

  • ONNX Runtime version (you are using): latest

Describe the solution you'd like
Prebuilt binaries for alpine linux

Describe alternatives you've considered
Installing onnxruntime@dev and building locally. That would require downloading compilers and other stuff that are not required at runtime but would solve the problem, but that gives an error starting with

npm ERR! code 1
npm ERR! path /uuu/node_modules/onnxruntime
npm ERR! command failed
npm ERR! command sh -c prebuild-install -r napi || (tsc && node ./script/build)
npm ERR! Version 4.4.4
npm ERR! tsc: The TypeScript Compiler - Version 4.4.4
npm ERR!

(tsconfig.json maybe??)

Additional context

A compelling reason to use NodeJS in alpine is the availability of prebuilt docker images, with great support.
Alpine is a lightweight Linux distribution based in musl as opposed to glibc. This means that binaries built for other popular Linux distributions such as Ubuntu won't work in alpine OS.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Node package's prebuild-install/build path shown in the error, including tsconfig.json and script/build. Reproduce the failure on Alpine and determine the packaging or build changes needed for a prebuilt Alpine binary. Done means the package installs and runs on Alpine without requiring compilers.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, node.js
Domain
build-system, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.