Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Error when creating a window in Docker WLS2

未关闭
#463 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
docker, nodejs, typescript

调研方向

在 Docker WSL2 中复现 USAGE.md 里的窗口化 @rapidsai/demo-graph 命令,并将其与可正常工作的非窗口化示例进行比较。从 modules/glfw/src/window.cpp 第 62-63 行以及报告的 jsdom GLFW 调用路径开始;完成标准是确定一种受支持的调用方式,或记录所需的限制和设置。

由索引模型根据 Issue 内容生成。

描述

I've been following the USAGE.md guide to set up node rapids with windows, and run into an issue with the windowed examples.

Windowed examples in docker WLS2, such as below, throw an exception in glfw.

REPO=ghcr.io/rapidsai/node
VERSIONS="22.12.2-runtime-node16.15.1-cuda11-ubuntu20.04"
docker run --rm -it --gpus all $REPO:$VERSIONS-demo npx @rapidsai/demo-graph

I've also tried variations of this based on this:

docker run --rm -it --gpus all
    -e "DISPLAY=$DISPLAY" \
    -v "/etc/fonts:/etc/fonts:ro" \
    -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    -v "/usr/share/fonts:/usr/share/fonts:ro" \
    -v "/usr/share/icons:/usr/share/icons:ro" \
    $REPO:$VERSIONS-demo \
    npx @rapidsai/demo-graph

I've also tried a couple different gpu flags. --gpus=0, --gpus all, and --runtime=nvidia. The gpus flags throw the same exception shown below.

Stack Trace for `--gpus`
Error creating GLFW window:
Error: api unavailable EGL: Failed to initialize EGL: EGL is not or could not be initialized
    at /opt/rapids/node/modules/glfw/src/window.cpp:62
    at createGLFWWindow (/home/node/node_modules/@rapidsai/jsdom/build/js/polyfills/glfw.js:599:39)
    at /home/node/node_modules/@rapidsai/jsdom/build/js/polyfills/glfw.js:697:23
    at /home/node/node_modules/@rapidsai/jsdom/build/js/index.js:83:42
    at Array.reduce (<anonymous>)
    at Object.beforeParse (/home/node/node_modules/@rapidsai/jsdom/build/js/index.js:83:19)
    at new JSDOM (/home/node/node_modules/jsdom/lib/api.js:40:13)
    at new RapidsJSDOM (/home/node/node_modules/@rapidsai/jsdom/build/js/index.js:59:9)
    at Function.fromReactComponent (/home/node/node_modules/@rapidsai/jsdom/build/js/index.js:40:23)
    at Module.module.exports (/home/node/node_modules/@rapidsai/demo-graph/index.js:39:18)
    at Object.<anonymous> (/home/node/node_modules/@rapidsai/demo-graph/index.js:58:10)
Uncaught Exception
Origin: uncaughtException
Exception: Error: api unavailable EGL: Failed to initialize EGL: EGL is not or could not be initialized
    at /opt/rapids/node/modules/glfw/src/window.cpp:62
    at createGLFWWindow (/home/node/node_modules/@rapidsai/jsdom/build/js/polyfills/glfw.js:599:39)
    at /home/node/node_modules/@rapidsai/jsdom/build/js/polyfills/glfw.js:697:23
    at /home/node/node_modules/@rapidsai/jsdom/build/js/index.js:83:42
    at Array.reduce (<anonymous>)
    at Object.beforeParse (/home/node/node_modules/@rapidsai/jsdom/build/js/index.js:83:19)
    at new JSDOM (/home/node/node_modules/jsdom/lib/api.js:40:13)
    at new RapidsJSDOM (/home/node/node_modules/@rapidsai/jsdom/build/js/index.js:59:9)
    at Function.fromReactComponent (/home/node/node_modules/@rapidsai/jsdom/build/js/index.js:40:23)
    at Module.module.exports (/home/node/node_modules/@rapidsai/demo-graph/index.js:39:18)
    at Object.<anonymous> (/home/node/node_modules/@rapidsai/demo-graph/index.js:58:10)

This exception points to:
https://github.com/rapidsai/node/blob/d28a85e10ac9e01e10a27468bbc866320facf241/modules/glfw/src/window.cpp#L62-L63

Is there something I should do differently when invoking docker?

Stack Trace for `--runtime=nvidia`
docker: Error response from daemon: unknown or invalid runtime name: nvidia.

Do I need to resolve this missing runtime issue?


Non-windowed node-rapids examples do work, such as this:

REPO=ghcr.io/rapidsai/node
VERSIONS="22.12.2-runtime-node16.15.1-cuda11-ubuntu20.04"
docker run --rm -it --gpus all $REPO:$VERSIONS-cudf -p "const {Seris, DataFrame} = require('@rapidsai/cudf'); new DataFrame({ a: Serienew([0,1,2]) }).toString()"
主要语言
TypeScript
星标
211
派生
29
平均合并
17 小时 30 分钟
30 天内合并 PR
1

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rapidsai/node 的其他 Issue

查看 rapidsai/node 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。