Loading...
Loading...
Executes Python scripts, tests, or benchmarks on a provisioned remote cluster (GPU or TPU) using SkyPilot. Use this skill when the user asks to run code on GPU, TPU, or any "remote" cluster.
npx skill4agent add primatrix/skills exec-remote| Target | Cluster name file | Launch script | UV extra | Env prefix |
|---|---|---|---|---|
| GPU | | | | |
| TPU | | | | (none) |
scripts/globfindlaunch_gpu.shlaunch_tpu.sh.cluster_name_gpu.cluster_name_tpu# Note: First locate the scripts as instructed above, then run them.
# GPU — common accelerator types: H100:1, A100:1, L4:1
bash <absolute_path_to_launch_gpu.sh> <accelerator_type> <experiment_name>
# TPU — common accelerator types: tpu-v4-8, tpu-v4-16, tpu-v6e-1, tpu-v6e-4
bash <absolute_path_to_launch_tpu.sh> <accelerator_type> <experiment_name>.cluster_name_*# GPU
sky down $(cat .cluster_name_gpu) -y
# TPU
sky down $(cat .cluster_name_tpu) -ysky exec $(cat .cluster_name_gpu) --workdir . "export CUDA_VISIBLE_DEVICES=0; uv run --extra gpu python <PATH_TO_SCRIPT> [ARGS]"export CUDA_VISIBLE_DEVICES=0;--extra gpujax[cuda]sky exec $(cat .cluster_name_tpu) --workdir . "uv run --extra tpu python <PATH_TO_SCRIPT> [ARGS]"--extra tpujax[tpu]--workdir .python -m pytest <test_path>sky exec $(cat .cluster_name_gpu) --workdir . "export CUDA_VISIBLE_DEVICES=0; uv run --extra gpu python src/lynx/perf/benchmark_train.py"sky exec $(cat .cluster_name_tpu) --workdir . "uv run --extra tpu python -m pytest src/lynx/test/"stdoutstderrCtrl+C