Skip to content

Commit bfc2bfb

Browse files
authored
Modify launch lab shortcode to add tear down instructions (#24640)
## Description Modify the shortcode used to launch labs to add teardown instructions. In order for the teardown instructions to work reliably (since there's no guarantee the user will be in the same directory), the startup command also adds a flag to specify the project name (`-p labspace`).
1 parent 32907e6 commit bfc2bfb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

layouts/_shortcodes/labspace-launch.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
{{ $modelDownload := .Get "model-download" | default "false" }}
33
{{ $browserUrl := .Get "browserUrl" | default "http://localhost:3030"}}
44

5-
{{ $step1 := printf "1. Start the labspace:\n\n ```console\n $ docker compose -f oci://%s up -d\n ```" $image }}
5+
{{ $step1 := printf "1. Start the labspace:\n\n ```console\n $ docker compose -p labspace -f oci://%s up -d\n ```" $image }}
66

77
{{ if eq $modelDownload "true" }}
88
{{ $step1 = printf "%s\n\n > [!NOTE]\n >\n > The lab may take a few minutes to launch, as this lab requires an AI model that will need to be downloaded." $step1 }}
99
{{ end }}
1010

1111
{{ $step2 := printf "2. Open your browser to [%s](%s)." $browserUrl $browserUrl }}
1212

13-
{{ printf "%s\n\n%s" $step1 $step2 | .Page.RenderString (dict "display" "block") }}
13+
{{ $step3 := "3. When you're done, tear down the labspace:\n\n ```console\n $ docker compose -p labspace down\n ```" }}
14+
15+
{{ printf "%s\n\n%s\n\n%s" $step1 $step2 $step3 | .Page.RenderString (dict "display" "block") }}

0 commit comments

Comments
 (0)