Skip to content

Commit 8d804cb

Browse files
author
Timothy Le
committed
basic isaac-lab osmo workflow
Signed-off-by: Timothy Le <tle@nebius.com>
1 parent 26fa51c commit 8d804cb

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
workflow:
2+
name: osmo-isaac-rl-launcher
3+
pool: default
4+
5+
resources:
6+
nebius-cli:
7+
cpu: 1
8+
memory: 2Gi
9+
platform: L40S
10+
11+
tasks:
12+
- name: trigger-isaac-l40s-job
13+
image: ubuntu:22.04
14+
resource: nebius-cli
15+
16+
environment:
17+
SUBNET_ID: "vpcsubnet-XXX"
18+
PARENT_ID: "project-XXX"
19+
NEBIUS_IAM_TOKEN: "<nebius iam get-access-token result>"
20+
NGC_API_KEY: "nvapi-XXX"
21+
22+
command:
23+
- bash
24+
- -lc
25+
args:
26+
- |
27+
set -euo pipefail
28+
29+
echo "--- 1. Install Nebius CLI ---"
30+
apt-get update && apt-get install -y curl bash jq
31+
32+
curl -sSL https://storage.eu-north1.nebius.cloud/cli/install.sh | bash
33+
34+
export PATH="$PATH:/root/.nebius/bin"
35+
nebius version
36+
37+
echo "--- 2. Configure Nebius credentials ---"
38+
mkdir -p /root/.nebius
39+
printf 'current-profile: default\nprofiles:\n default:\n endpoint: api.eu-north1.nebius.cloud:443\n parent-id: %s\n' \
40+
"$PARENT_ID" > /root/.nebius/config.yaml
41+
42+
echo "--- 3. Launch Isaac Lab L40S job ---"
43+
JOB_OUTPUT=$(nebius ai job create \
44+
--name "isaac-reachy-$(date +%s)" \
45+
--image "nvcr.io/nvidia/isaac-lab:2.3.2" \
46+
--registry-username "\$oauthtoken" \
47+
--registry-password "$NGC_API_KEY" \
48+
--platform "gpu-l40s-d" \
49+
--preset "1gpu-16vcpu-96gb" \
50+
--container-command "bash" \
51+
--args "-c '/workspace/isaaclab/isaaclab.sh -p -c \"import isaaclab; print(isaaclab.__version__)\"'" \
52+
--timeout "60m" \
53+
--subnet-id "$SUBNET_ID" \
54+
--parent-id "$PARENT_ID")
55+
echo "Job create response: $JOB_OUTPUT"
56+
JOB_ID=$(echo "$JOB_OUTPUT" | grep -oP 'aijob-\w+' | head -1)
57+
echo "Submitted job: $JOB_ID"
58+
59+
echo "--- 4. Wait for job completion ---"
60+
while true; do
61+
JOB_RAW=$(nebius ai job get --id "$JOB_ID" --format json 2>&1)
62+
STATUS=$(echo "$JOB_RAW" | jq -r '.status.phase // .status.state // empty' 2>/dev/null \
63+
|| echo "$JOB_RAW" | grep -oP '(RUNNING|SUCCEEDED|COMPLETED|FAILED|ERROR|CANCELLED|STARTING|PENDING)' | head -1)
64+
echo "Job status: $STATUS"
65+
case "$STATUS" in
66+
SUCCEEDED|COMPLETED) echo "Isaac Lab job completed successfully."; break ;;
67+
FAILED|ERROR|CANCELLED) echo "Isaac Lab job failed with status: $STATUS"; exit 1 ;;
68+
*) sleep 30 ;;
69+
esac
70+
done

0 commit comments

Comments
 (0)