n/open-sourceu/fat3264 · 6 个月前
注册 登录
n/open-source · 6 个月前 · 已编辑 · 2775 次浏览
u/fat3264荣誉会员钻石

Nvidia 自动开机参考资料

前提条件:通过 https://dsx-air.nvidia.com/ 注册并成功申请到试用资格,且创建好simulations

先打开 https://dsx-air.nvidia.com/simulations 找到自己的simulationsID
例如:nodeloce-7dec-11d0-a765-00a0cnodeloc

然后在登录状态下,打开F12,直接在Console里粘贴如下代码(自行修改sid和URL前缀)
另外可能脚本中dsx-air前缀不一定是最新的,如有新的则替换成新的(比如air-ngc)

[upvote]

if (window._sMonitor?.isActive) {
  window._sMonitor.destroy();
}

class SMonitor {
  #sid = "nodeloce-7dec-11d0-a765-00a0cnodeloc"; //自己的simulationsID
  #intervalMs = 3000; //任务间隔 毫秒数
  #abortController = null;
  #timerId = null;

  constructor() {
    this.isActive = true;
    this.#initLoop();
  }

  get #requestConfig() {
    return {
      method: "PATCH",
      mode: "cors",
      credentials: "include",
      referrer: `https://dsx-air.nvidia.com/simulations/${this.#sid}`,
      headers: {
        "accept": "application/json, text/plain, */*",
        "cache-control": "no-cache",
        "pragma": "no-cache"
      }
    };
  }

  async #pingState() {
    const timestamp = () => `[${new Date().toLocaleTimeString()}]`;
    const url = `https://api.dsx-air.nvidia.com/api/v3/simulations/${this.#sid}/start/`;

    try {
      const response = await fetch(url, {
        ...this.#requestConfig,
        signal: this.#abortController?.signal
      });

      const rawText = await response.text();
      let parsedData;
      
      try {
        parsedData = JSON.parse(rawText);
      } catch {
        parsedData = rawText;
      }

      if (parsedData && typeof parsedData === 'object' && 'state' in parsedData) {
        console.log(`${timestamp()} State:`, parsedData.state);
      } else {
        console.log(`${timestamp()} Raw Response:`, parsedData);
      }

      if (!response.ok) {
        console.log(`${timestamp()} HTTP Error:`, response.status);
      }

    } catch (err) {
        console.log(`${timestamp()} Network/Request Failed:`, err);
    }
  }

  #initLoop() {
    this.#abortController = new AbortController();
    
    const tick = async () => {
      if (!this.isActive) return;
      await this.#pingState();
      if (this.isActive) {
        this.#timerId = setTimeout(tick, this.#intervalMs);
      }
    };

    tick();
  }

  destroy() {
    this.isActive = false;
    if (this.#timerId) clearTimeout(this.#timerId);
    if (this.#abortController) this.#abortController.abort();
    console.log("stopped and cleaned up.");
  }
}

window._sMonitor = new SMonitor();

[/upvote]

只要代码开始运行了就不要再操作这个网站了以防止自动退出登录,再之后出现任何错误都不用理会。
只要返回如下类似内容,就表示代码正常运行了。

HTTP Error: 400
HTTP Error: 403
State: REQUESTING

PS:如果申请试用资格失败的话,貌似换个IP再刷新页面有机率申请成功!

Good luck to all

34
165
登录后参与讨论。
u/udc2b6nr 广告
QuicksilverVPN

快银 VPN,一键连接全球节点,线路稳定、延迟低。支持 Windows、macOS 等多平台,TUN 全局模式覆盖全部应用流量。无需复杂配置,下载即用。

umami.dnsl.top 了解更多

165 条回复

排序
  1. GeorgeXie 💬 钻石 不离不弃 6 个月前

    厉害了大佬

    3
  2. BearPaw 钻石 6 个月前

    我还要等吗???:xhj19:

    3
  3. wboo 白银 6 个月前

    支持一个,还没有开出来

    2
  4. liuhaha 黄金 2 YEARS 6 个月前

    学习一下

    2
  5. BearPaw 钻石 6 个月前

    看看,感谢大佬

    2
  6. eooce 荣誉会员 钻石 大神 6 个月前

    顶配就位

    2
  7. James 💯 王者 MANAGER 6 个月前

    怎么还能DD win,太牛逼了

    0
  8. supers 王者 王者会员 6 个月前

    早玩过了,哈哈。

    0
  9. zhoujia 富可敌国 钻石 6 个月前

    试试

    1
  10. AlteremLiu 💭 钻石 6 个月前

    期待我的好消息

    1
  11. zhoujia 富可敌国 钻石 6 个月前

    小鸡其实已经更新好了,但没法开机 :xhj001:

    1
  12. hakd 钻石 2 YEARS 6 个月前

    反正我是开不出机器来。
    只能看看了。

    1
  13. zhizhang31415926-ops 白银 6 个月前

    试一下能不能开,手动开不了

    1
  14. zhongting 黄金 6 个月前

    看看

    1
  15. jhon_xin 黄金 6 个月前

    感谢大佬

    1
  16. hankswang01 黄金 不离不弃 6 个月前

    谢谢大佬

    1
  17. biubiuball 黄金 6 个月前

    不错的内容,Mark

    1
  18. zbigbird 白银 6 个月前

    学习一下

    1
  19. linxone2895 黄金 6 个月前

    支持一个!

    1
  20. Pua 白银 3 YEARS 6 个月前

    来晚了啊,没有资格了

    0
  21. acwea904 黄金 3 YEARS 6 个月前

    支持一个

    0
  22. sdcfre 钻石 3 YEARS 6 个月前

    看看

    0
  23. eryingzhang 黄金 6 个月前

    正需要 看看

    0
  24. reidentify 白银 6 个月前

    支持一下。感谢分享

    0
  25. AlteremLiu 💭 钻石 6 个月前

    我看看

    0
  26. eryingzhang 黄金 6 个月前

    simulationsID 在哪个位置,大佬帮忙截个图 谢谢

    0
  27. AlteremLiu 💭 钻石 6 个月前
    1
  28. Jessadmin 白银 3 YEARS 6 个月前

    学习学习

    0
  29. techthink 白银 6 个月前

    感谢大佬,膜拜

    0
  30. Lazy 白银 3 YEARS 6 个月前

    厉害了

    0
  31. lo_Yuki 白银 6 个月前

    看看怎么样

    0
  32. mansel 白银 6 个月前

    看一看

    0
  33. yellowbins 黄金 3 YEARS 6 个月前

    支持一个

    0