|
46 | 46 | ensure_sudo_session, |
47 | 47 | log, |
48 | 48 | log_error, |
| 49 | + log_success, |
49 | 50 | set_verbose, |
50 | 51 | start_sudo_keepalive, |
51 | 52 | ) |
|
99 | 100 | rt remove Remove JupyterHub runtime |
100 | 101 |
|
101 | 102 | img build [target...] Build custom images (default: all, or hub + selected courses) |
102 | | - Targets: all, hub, base-cpu, base-rocm, cv, dl, llm, physim |
| 103 | + Targets: all, hub, base-cpu, base-rocm, code, code-cpu, code-gpu, cv, dl, llm, physim |
103 | 104 | img pull Pull external images for offline use |
104 | 105 |
|
105 | 106 | detect-gpu Show detected GPU configuration |
|
146 | 147 | unselected courses are hidden in the spawn UI. Empty (the |
147 | 148 | default) keeps the historical "all courses" behaviour. |
148 | 149 | all - every course |
149 | | - basic - cpu base + gpu base only |
| 150 | + basic - cpu/gpu base + code-server (code-cpu, code-gpu) |
150 | 151 | none - Hub only, no courses |
151 | 152 | <list> - comma-separated keys, e.g. cpu,gpu,Course-CV |
152 | 153 | Env: AUPLC_COURSES |
|
176 | 177 | ./auplc-installer install --gpu=strix-halo |
177 | 178 | ./auplc-installer install --gpu=auto --dry-run |
178 | 179 | ./auplc-installer install --gpu=phx --docker=0 # legacy flags |
179 | | - ./auplc-installer install --courses=basic # cpu + gpu only |
| 180 | + ./auplc-installer install --courses=basic # base + code-server envs |
180 | 181 | ./auplc-installer install --courses=cpu,gpu,Course-CV |
181 | 182 | ./auplc-installer img build base-rocm --gpu=strix |
182 | 183 | ./auplc-installer install --mirror=mirror.example.com |
@@ -565,17 +566,19 @@ def cmd_dev_quick(state: InstallerState) -> None: |
565 | 566 | log("Dev quick cycle: build hub → restart pod") |
566 | 567 | log("===========================================") |
567 | 568 | detect_and_configure_gpu(state.gpu, gpu_type_override=state.gpu_type) |
568 | | - local_image_build( |
569 | | - ["hub"], |
570 | | - cfg=state.gpu, |
571 | | - courses=state.courses, |
572 | | - mirror_prefix=state.mirror_prefix, |
573 | | - mirror_pip=state.mirror_pip, |
574 | | - mirror_npm=state.mirror_npm, |
575 | | - use_docker=state.use_docker, |
576 | | - k3s_images_dir=state.k3s_images_dir, |
577 | | - ) |
578 | | - dev_quick_rollout() |
| 569 | + with stage("Building Hub image", idx=1, total=2): |
| 570 | + local_image_build( |
| 571 | + ["hub"], |
| 572 | + cfg=state.gpu, |
| 573 | + courses=state.courses, |
| 574 | + mirror_prefix=state.mirror_prefix, |
| 575 | + mirror_pip=state.mirror_pip, |
| 576 | + mirror_npm=state.mirror_npm, |
| 577 | + use_docker=state.use_docker, |
| 578 | + k3s_images_dir=state.k3s_images_dir, |
| 579 | + ) |
| 580 | + with stage("Restarting Hub pod", idx=2, total=2): |
| 581 | + dev_quick_rollout() |
579 | 582 |
|
580 | 583 |
|
581 | 584 | def cmd_dev_deploy(state: InstallerState) -> None: |
@@ -686,25 +689,29 @@ def cmd_rt_reinstall(state: InstallerState) -> None: |
686 | 689 |
|
687 | 690 | def cmd_img_build(state: InstallerState, targets: Sequence[str]) -> None: |
688 | 691 | detect_and_configure_gpu(state.gpu, gpu_type_override=state.gpu_type) |
689 | | - local_image_build( |
690 | | - targets, |
691 | | - cfg=state.gpu, |
692 | | - courses=state.courses, |
693 | | - mirror_prefix=state.mirror_prefix, |
694 | | - mirror_pip=state.mirror_pip, |
695 | | - mirror_npm=state.mirror_npm, |
696 | | - use_docker=state.use_docker, |
697 | | - k3s_images_dir=state.k3s_images_dir, |
698 | | - ) |
| 692 | + with stage("Building custom images", idx=1, total=1): |
| 693 | + local_image_build( |
| 694 | + targets, |
| 695 | + cfg=state.gpu, |
| 696 | + courses=state.courses, |
| 697 | + mirror_prefix=state.mirror_prefix, |
| 698 | + mirror_pip=state.mirror_pip, |
| 699 | + mirror_npm=state.mirror_npm, |
| 700 | + use_docker=state.use_docker, |
| 701 | + k3s_images_dir=state.k3s_images_dir, |
| 702 | + ) |
| 703 | + log_success("Custom images built successfully.") |
699 | 704 |
|
700 | 705 |
|
701 | 706 | def cmd_img_pull(state: InstallerState) -> None: |
702 | | - pull_external_images( |
703 | | - skip_build_only=False, |
704 | | - use_docker=state.use_docker, |
705 | | - k3s_images_dir=state.k3s_images_dir, |
706 | | - mirror_prefix=state.mirror_prefix, |
707 | | - ) |
| 707 | + with stage("Pulling external images", idx=1, total=1): |
| 708 | + pull_external_images( |
| 709 | + skip_build_only=False, |
| 710 | + use_docker=state.use_docker, |
| 711 | + k3s_images_dir=state.k3s_images_dir, |
| 712 | + mirror_prefix=state.mirror_prefix, |
| 713 | + ) |
| 714 | + log_success("External images pulled successfully.") |
708 | 715 |
|
709 | 716 |
|
710 | 717 | # --------------------------------------------------------------------------- |
@@ -871,7 +878,7 @@ def _dispatch( |
871 | 878 | else: |
872 | 879 | log_error( |
873 | 880 | "Usage: auplc-installer img {build [target...]|pull}. " |
874 | | - "Targets: all, hub, base-cpu, base-rocm, cv, dl, llm, physim" |
| 881 | + "Targets: all, hub, base-cpu, base-rocm, code, code-cpu, code-gpu, cv, dl, llm, physim" |
875 | 882 | ) |
876 | 883 | sys.exit(1) |
877 | 884 | return |
|
0 commit comments