Skip to content

[js/node] update install script to allow use proxy - #23242

Merged
fs-eire merged 1 commit into
mainfrom
fs-eire/js-node-install-script-allow-proxy
Jan 3, 2025
Merged

[js/node] update install script to allow use proxy#23242
fs-eire merged 1 commit into
mainfrom
fs-eire/js-node-install-script-allow-proxy

Conversation

@fs-eire

@fs-eire fs-eire commented Jan 2, 2025

Copy link
Copy Markdown
Contributor

Description

Use https.get instead of fetch in ORT Nodejs binding package install script.

Motivation and Context

According to discussions in #23232, the package global-agent cannot work with fetch API. To make it work with the proxy agent, this PR replaces the fetch API with https.get in the install script.

@snnn
snnn requested a review from Copilot January 3, 2025 22:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@fs-eire
fs-eire merged commit 5c2e60c into main Jan 3, 2025
@fs-eire
fs-eire deleted the fs-eire/js-node-install-script-allow-proxy branch January 3, 2025 22:27
snnn pushed a commit that referenced this pull request Jan 8, 2025
### Description

Use `https.get` instead of `fetch` in ORT Nodejs binding package install
script.

### Motivation and Context

According to discussions in #23232, the package `global-agent` cannot
work with `fetch` API. To make it work with the proxy agent, this PR
replaces the `fetch` API with `https.get` in the install script.
tarekziade pushed a commit to tarekziade/onnxruntime that referenced this pull request Jan 10, 2025
### Description

Use `https.get` instead of `fetch` in ORT Nodejs binding package install
script.

### Motivation and Context

According to discussions in microsoft#23232, the package `global-agent` cannot
work with `fetch` API. To make it work with the proxy agent, this PR
replaces the `fetch` API with `https.get` in the install script.
guschmue pushed a commit that referenced this pull request Jan 12, 2025
### Description

Use `https.get` instead of `fetch` in ORT Nodejs binding package install
script.

### Motivation and Context

According to discussions in #23232, the package `global-agent` cannot
work with `fetch` API. To make it work with the proxy agent, this PR
replaces the `fetch` API with `https.get` in the install script.
ashrit-ms pushed a commit that referenced this pull request Mar 17, 2025
### Description

Use `https.get` instead of `fetch` in ORT Nodejs binding package install
script.

### Motivation and Context

According to discussions in #23232, the package `global-agent` cannot
work with `fetch` API. To make it work with the proxy agent, this PR
replaces the `fetch` API with `https.get` in the install script.
@maximegmd

maximegmd commented Mar 25, 2025

Copy link
Copy Markdown

While I do not get the error message anymore, the script just hangs forever now.

If I ctrl+c the running npm install I get the following:

npm info run onnxruntime-node@1.21.0 postinstall { code: null, signal: 'SIGINT' }
npm error path /data/xxx/open-webui/node_modules/onnxruntime-node
npm error command failed
npm error signal SIGINT
npm error command sh -c node ./script/install
npm error Downloading "https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-gpu-1.21.0.tgz"...
npm error `nvcc` not found. Assuming CUDA 12.

@fs-eire

fs-eire commented Mar 25, 2025

Copy link
Copy Markdown
Contributor Author

While I do not get the error message anymore, the script just hangs forever now.

If I ctrl+c the running npm install I get the following:

npm info run onnxruntime-node@1.21.0 postinstall { code: null, signal: 'SIGINT' }
npm error path /data/xxx/open-webui/node_modules/onnxruntime-node
npm error command failed
npm error signal SIGINT
npm error command sh -c node ./script/install
npm error Downloading "https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-gpu-1.21.0.tgz"...
npm error `nvcc` not found. Assuming CUDA 12.

From the error message it can only tell that an ongoing download is cancelled. Is your proxy setting working actually?

@maximegmd

Copy link
Copy Markdown

While I do not get the error message anymore, the script just hangs forever now.
If I ctrl+c the running npm install I get the following:

npm info run onnxruntime-node@1.21.0 postinstall { code: null, signal: 'SIGINT' }
npm error path /data/xxx/open-webui/node_modules/onnxruntime-node
npm error command failed
npm error signal SIGINT
npm error command sh -c node ./script/install
npm error Downloading "https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-gpu-1.21.0.tgz"...
npm error `nvcc` not found. Assuming CUDA 12.

From the error message it can only tell that an ongoing download is cancelled. Is your proxy setting working actually?

It works for other packages, npm downloads everything, it just hangs on the script/install execution that downloads the file from github.

@fs-eire

fs-eire commented Mar 26, 2025

Copy link
Copy Markdown
Contributor Author

While I do not get the error message anymore, the script just hangs forever now.
If I ctrl+c the running npm install I get the following:

npm info run onnxruntime-node@1.21.0 postinstall { code: null, signal: 'SIGINT' }
npm error path /data/xxx/open-webui/node_modules/onnxruntime-node
npm error command failed
npm error signal SIGINT
npm error command sh -c node ./script/install
npm error Downloading "https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-gpu-1.21.0.tgz"...
npm error `nvcc` not found. Assuming CUDA 12.

From the error message it can only tell that an ongoing download is cancelled. Is your proxy setting working actually?

It works for other packages, npm downloads everything, it just hangs on the script/install execution that downloads the file from github.

could you check if https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-gpu-1.21.0.tgz is available to you under your current proxy setting?

if you check the code, you can see that script/install.js uses https.get to download the URL and it that hangs I am not sure what we can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants