【NVIDIA】从注册-->开机-->保活详细全流程
偷得各位大佬的教程,首先你的有一个能注册且获得NVIDIA开发者计划的邮箱,一般推荐域名邮箱1,注册。
注册站:https://dsx-air.nvidia.com
注册到最后你要看到如图所示就是符合资格:
https://cdn.nodeimage.com/i/lzOvUygxw7nvHMtRLWgyJgkawSwM0FHb.png
2,创建及开机(目前没有资源,需控制台抢。)
创建simulations
https://cdn.nodeimage.com/i/wKMGFMu3XmboYQpwE3vGIFOJBqe0JRwF.png
https://cdn.nodeimage.com/i/vIsXKmIANMrzjkFYYkDcVhMAg6QbYZmd.png
把oob-mgmt-server拖到主界面,点击它选择规格+系统
https://cdn.nodeimage.com/i/vE1Sycpyvd10IeV3YvtPRIvkpgckwqOl.png
https://cdn.nodeimage.com/i/xm2efVGTDhnW4EJELPYLYXZdbVpEKlNy.png
点击右下角的 更新配置
然后双击oob-mgmt-server点击开机
https://cdn.nodeimage.com/i/AvIwxfhPIVUUSL5CfjKtu8Z9okoCCIsM.png
你大概率会遇到没有资源的情况,如下,那就要抢鸡了:
https://cdn.nodeimage.com/i/Zd38xWC0NALlvgq4o75KaMxNN6ik5zpQ.png
打开控制台
按F12 开发者模式,打开控制台,粘贴命令,回车。
https://cdn.nodeimage.com/i/b5LKsx2BwMeg7zoFXsSPvRXSBoyeFxa0.png
运行以下脚本(记得更换其中simulations ID ):
simulations ID位置在你的浏览器地址栏
https://cdn.nodeimage.com/i/jaCDjoeVr9BxcyYsn9AxFjMp8TKEusuQ.png
跑起来后显示HTTP Error: 400 State: REQUESTING均为正常现象,正在尝试开机,且失败重试。
if (window._sMonitor?.isActive) {
window._sMonitor.destroy();
}
class SMonitor {
#sid = "4c5987bf-0588-4795-xxxxxxxxx-xxxxxxxxx"; //你自己的simulations ID
#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();
3,开机后,做端口映射。
比如你要映射SSH端口:
https://cdn.nodeimage.com/i/JY3o9OCqObJLhkq5CNBzxHasFPIgrjyH.png
我涂掉 的就是你的IP+映射端口
https://cdn.nodeimage.com/i/UlTKiEkLOdZgCdcqA8OVLtIg8me50gF6.png
首次开机默认用户名 和密码 右下角有显示。
我的是ubuntu和nvidia
自己DD即可。
4,开启API,自动保活
免费用户默认最多保持3天活跃就给你停鸡休眠,所以需要保活。(存疑,之前是3天,但刚才试了试手动延长,竟然没提示拒绝?)
自动保活要用到API,来这里创建你的API:
https://org.ngc.nvidia.com/account/api-keys
选择好权限,创建,记住。
https://cdn.nodeimage.com/i/7CkZek6PLCyhSKznBIAOkX8GSabMziqm.png
脚本(注意更换你的API和simulation_id):
手动跑一次,日志没问题就创建定时任务即可,脚本作者建议每6小时。
#!/usr/bin/env bash
set -euo pipefail
NVIDIA_AIR_API_BASE="https://api.air-ngc.nvidia.com/api/v3"
NVIDIA_AIR_API_KEY="你的_NGC_API_KEY"
SIMULATION_ID="你的_simulation_id"
target_sleep_at="$(
python3 - <<'PY'
from datetime import datetime, timedelta, timezone
target = datetime.now(timezone.utc) + timedelta(hours=71)
print(target.replace(microsecond=0).isoformat().replace("+00:00", "Z"))
PY
)"
payload="$(mktemp)"
before_body="$(mktemp)"
after_body="$(mktemp)"
trap 'rm -f "$payload" "$before_body" "$after_body"' EXIT
printf '{"sleep_at":"%s"}' "$target_sleep_at" > "$payload"
simulation_url="${NVIDIA_AIR_API_BASE%/}/simulations/${SIMULATION_ID}/"
echo "target_sleep_at=$target_sleep_at"
curl --ipv4 -sS \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'User-Agent: air-sdk/1.3.1' \
-H 'X-Air-Sdk-Version: 1.3.1' \
-H "Authorization: Bearer $NVIDIA_AIR_API_KEY" \
"$simulation_url" > "$before_body"
echo "before_sleep_at=$(python3 -c 'import json,sys; print(json.load(open(sys.argv)).get("sleep_at"))' "$before_body")"
curl --ipv4 -sS -X PATCH \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'User-Agent: air-sdk/1.3.1' \
-H 'X-Air-Sdk-Version: 1.3.1' \
-H "Authorization: Bearer $NVIDIA_AIR_API_KEY" \
--data @"$payload" \
"$simulation_url" > "$after_body"
after_sleep_at="$(python3 -c 'import json,sys; print(json.load(open(sys.argv)).get("sleep_at"))' "$after_body")"
echo "after_sleep_at=$after_sleep_at"
if [ "$after_sleep_at" != "$target_sleep_at" ]; then
echo "verify failed: expected=$target_sleep_at actual=$after_sleep_at" >&2
exit 1
fi
echo "ok"
完事儿,连脚本都是偷的大佬的,感觉有用的话给点个赞 大佬,牛逼!! 很详细的教程 账户不支持是咋回事,我用域名邮箱也不可以,是要教育邮箱吗 牛逼正需要,我的机子就是0CPU没有内存 第一张图片都到不了啊 厉害啊大佬,支持一下 There was an error creating your free trial.
There was an error creating your free trial.
Failed to start your free trial. Please contact support. 各种失败,启动不了,羊毛太难薅了 本帖最后由 ethanhooks 于 2026-5-21 21:01 编辑
这机器默认开出来的机器都是10G硬盘,我设置成100G也是10G,就开了一台1C1G 和2C4G 2台机器
好像已经取消了 CPU和内存限制了 我也是配额是0
但是机器没关。你们还有配额吗
Org JQ will exceed its concurrent cpu limit by starting this sim. The cpu limit is 0 vCPU, this sim requires 1 vCPU, and this org is already using 3 vCPU. 创建免费试用时出现了错误。
未能启动免费试用。请联系客服。 Failed to start your free trial. Please contact support.
页:
[1]