con un clic
jetson-ai-lab-code-samples
// Place downloadable tutorial scripts under public/code-samples/ and link them from tutorial pages. Use when adding, moving, or linking downloadable scripts, assets, or code files for Jetson AI Lab tutorials.
// Place downloadable tutorial scripts under public/code-samples/ and link them from tutorial pages. Use when adding, moving, or linking downloadable scripts, assets, or code files for Jetson AI Lab tutorials.
Run npm run build on jetson-ai-lab and triage Astro content collection / MDX / model frontmatter / benchmarks.json failures after edits. Use when verifying the site builds after content, model, tutorial, benchmark, or asset changes.
Configure Jetson AI Lab model pages — frontmatter for the Model Details sidebar (parameters, modalities, context length, license, precision pills), the Run on Jetson serve/call/one-shot UI, the three "block" levers (hide_run_button, matrix_modules_disabled, per-engine modules_supported), and the join to src/data/benchmarks.json (benchmark_key, benchmark_series, OOM vs DNR vs null). Use when adding or editing model pages, inference engines, serve/run commands, one-shot blocks, the details sidebar, benchmark wiring, or deciding whether to mark a Jetson module as OOM, blocked, or simply untested.
| name | jetson-ai-lab-code-samples |
| description | Place downloadable tutorial scripts under public/code-samples/ and link them from tutorial pages. Use when adding, moving, or linking downloadable scripts, assets, or code files for Jetson AI Lab tutorials. |
| license | Apache-2.0 |
| compatibility | Requires Node.js and npm for optional build verification. |
public/code-samples/Runnable Python, shell, and other assets that users download or curl from tutorials must live under the repoΓÇÖs static asset tree:
public/code-samples/<topic-folder>/
Astro copies public/ to the site root, so these files are served at:
https://www.jetson-ai-lab.com/code-samples/<topic-folder>/<file>
(path /code-samples/... on the deployed site).
Do not use a folder named code-sample (singular) or skip public/ for files meant to be fetched by users from the live site.
Group files by tutorial or feature area (kebab-case folder names, consistent with the repo today):
| Folder | Example files |
|---|---|
public/code-samples/finetune/ | full_sft_finetuning.py, lora_finetuning.py, qlora_finetuning.py |
public/code-samples/openclaw-orin-nano/ | setup-openclaw-orin-nano.py, endurance-test.py, multi-agent-debate.py |
public/code-samples/openpi_on_thor/ | download.sh, build_engine.sh, pytorch_to_onnx.py, Dockerfiles, etc. |
List the current tree with your OS or git ls-files public/code-samples before adding new paths.
Add new scripts or small assets under the appropriate public/code-samples/<topic>/ directory (create the directory if it is new).
Reference them from tutorial MD/MDX using either:
https://www.jetson-ai-lab.com/code-samples/<topic>/<filename>src/content/tutorials/model-optimization/finetune-on-jetson.mdx (wget lines for full_sft_finetuning.py, etc.).curl | bash or pipe-to-python):https://raw.githubusercontent.com/NVIDIA-AI-IOT/jetson-ai-lab/main/public/code-samples/<topic>/<filename>src/content/tutorials/applications/openclaw.md, src/content/tutorials/vla/openpi_on_thor.md.Prefer keeping long scripts in public/code-samples/ and linking themΓÇöavoid embedding huge scripts only inside MDX unless there is a strong reason.
src/ alone (they would not be served at /code-samples/... unless additionally copied to public/).static/code-sample/ for this siteΓÇÖs conventions.After adding or moving files under public/code-samples/:
npm run build from the repository root (see skill jetson-ai-lab-verify-build)./code-samples/<topic>/<file> locally to confirm the file is served.| Item | Path |
|---|---|
| Asset root | public/code-samples/ |
| Finetune tutorial links | src/content/tutorials/model-optimization/finetune-on-jetson.mdx (~lines 107ΓÇô110 for wget URLs) |
| OpenClaw raw GitHub links | src/content/tutorials/applications/openclaw.md |
| OpenPI Thor links | src/content/tutorials/vla/openpi_on_thor.md |