@aws/ml-container-creator 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/bin/cli.js +31 -137
  2. package/config/parameter-schema-v2.json +2065 -0
  3. package/package.json +6 -3
  4. package/servers/lib/catalogs/jumpstart-public.json +101 -16
  5. package/servers/lib/catalogs/models.json +182 -26
  6. package/src/app.js +6 -389
  7. package/src/lib/bootstrap-command-handler.js +75 -1078
  8. package/src/lib/bootstrap-profile-manager.js +634 -0
  9. package/src/lib/bootstrap-provisioners.js +421 -0
  10. package/src/lib/config-loader.js +405 -0
  11. package/src/lib/config-manager.js +59 -1668
  12. package/src/lib/config-mcp-client.js +118 -0
  13. package/src/lib/config-validator.js +634 -0
  14. package/src/lib/cuda-resolver.js +140 -0
  15. package/src/lib/e2e-catalog-validator.js +251 -3
  16. package/src/lib/e2e-ci-recorder.js +103 -0
  17. package/src/lib/generated/cli-options.js +471 -0
  18. package/src/lib/generated/parameter-matrix.js +671 -0
  19. package/src/lib/generated/validation-rules.js +202 -0
  20. package/src/lib/marketplace-flow.js +276 -0
  21. package/src/lib/mcp-query-runner.js +768 -0
  22. package/src/lib/parameter-schema-validator.js +62 -18
  23. package/src/lib/prompt-runner.js +41 -1504
  24. package/src/lib/prompts/feature-prompts.js +172 -0
  25. package/src/lib/prompts/index.js +48 -0
  26. package/src/lib/prompts/infrastructure-prompts.js +690 -0
  27. package/src/lib/prompts/model-prompts.js +552 -0
  28. package/src/lib/prompts/project-prompts.js +70 -0
  29. package/src/lib/prompts.js +2 -1446
  30. package/src/lib/registry-command-handler.js +135 -3
  31. package/src/lib/secrets-prompt-runner.js +251 -0
  32. package/src/lib/template-variable-resolver.js +398 -0
  33. package/templates/code/serve +5 -134
  34. package/templates/code/serve.d/lmi.ejs +19 -0
  35. package/templates/code/serve.d/sglang.ejs +47 -0
  36. package/templates/code/serve.d/tensorrt-llm.ejs +53 -0
  37. package/templates/code/serve.d/vllm.ejs +48 -0
  38. package/templates/do/clean +1 -1387
  39. package/templates/do/clean.d/async-inference.ejs +508 -0
  40. package/templates/do/clean.d/batch-transform.ejs +512 -0
  41. package/templates/do/clean.d/hyperpod-eks.ejs +481 -0
  42. package/templates/do/clean.d/managed-inference.ejs +1043 -0
  43. package/templates/do/deploy +1 -1766
  44. package/templates/do/deploy.d/async-inference.ejs +501 -0
  45. package/templates/do/deploy.d/batch-transform.ejs +529 -0
  46. package/templates/do/deploy.d/hyperpod-eks.ejs +339 -0
  47. package/templates/do/deploy.d/managed-inference.ejs +726 -0
  48. package/config/parameter-schema.json +0 -88
@@ -0,0 +1,47 @@
1
+ # ---------------------------------------------------------------------------
2
+ # SGLang Server Configuration
3
+ # ---------------------------------------------------------------------------
4
+ # Env prefix: SGLANG_
5
+ # Entrypoint: python3 -m sglang.launch_server
6
+ # Port: 8080 (SageMaker requirement)
7
+ # ---------------------------------------------------------------------------
8
+
9
+ PREFIX="SGLANG_"
10
+ ARG_PREFIX="--"
11
+
12
+ EXCLUDE_VARS=()
13
+
14
+ # Declare and populate array of matching environment variables
15
+ mapfile -t env_vars < <(env | grep "^${PREFIX}")
16
+
17
+ # Convert SGLANG_ env vars to CLI arguments
18
+ for var in "${env_vars[@]}"; do
19
+ IFS='=' read -r key value <<< "$var"
20
+
21
+ # Skip excluded variables
22
+ skip=false
23
+ for exclude in "${EXCLUDE_VARS[@]}"; do
24
+ if [ "$key" = "$exclude" ]; then
25
+ skip=true
26
+ break
27
+ fi
28
+ done
29
+ if [ "$skip" = true ]; then continue; fi
30
+
31
+ # Remove prefix, convert to lowercase, replace underscores with dashes
32
+ arg_name=$(echo "${key#"${PREFIX}"}" | tr '[:upper:]' '[:lower:]' | tr '_' '-')
33
+
34
+ # Boolean handling: true = flag only, false = skip entirely
35
+ if [ "$value" = "false" ]; then continue; fi
36
+
37
+ SERVER_ARGS+=("${ARG_PREFIX}${arg_name}")
38
+ if [ -n "$value" ] && [ "$value" != "true" ]; then
39
+ SERVER_ARGS+=("$value")
40
+ fi
41
+ done
42
+
43
+ echo "-------------------------------------------------------------------"
44
+ echo "SGLang engine args: [${SERVER_ARGS[@]}]"
45
+ echo "-------------------------------------------------------------------"
46
+
47
+ exec python3 -m sglang.launch_server "${SERVER_ARGS[@]}"
@@ -0,0 +1,53 @@
1
+ # ---------------------------------------------------------------------------
2
+ # TensorRT-LLM Server Configuration
3
+ # ---------------------------------------------------------------------------
4
+ # Env prefix: TRTLLM_
5
+ # Entrypoint: trtllm-serve serve MODEL [OPTIONS]
6
+ # Port: 8081 (nginx proxies to 8080 for SageMaker)
7
+ # ---------------------------------------------------------------------------
8
+
9
+ PREFIX="TRTLLM_"
10
+ ARG_PREFIX="--"
11
+
12
+ # TRTLLM_MODEL is used as the positional argument, not a --flag
13
+ EXCLUDE_VARS=("TRTLLM_MODEL")
14
+
15
+ # Declare and populate array of matching environment variables
16
+ mapfile -t env_vars < <(env | grep "^${PREFIX}")
17
+
18
+ # Convert TRTLLM_ env vars to CLI arguments
19
+ for var in "${env_vars[@]}"; do
20
+ IFS='=' read -r key value <<< "$var"
21
+
22
+ # Skip excluded variables
23
+ skip=false
24
+ for exclude in "${EXCLUDE_VARS[@]}"; do
25
+ if [ "$key" = "$exclude" ]; then
26
+ skip=true
27
+ break
28
+ fi
29
+ done
30
+ if [ "$skip" = true ]; then continue; fi
31
+
32
+ # Remove prefix, convert to lowercase, replace underscores with dashes
33
+ arg_name=$(echo "${key#"${PREFIX}"}" | tr '[:upper:]' '[:lower:]' | tr '_' '-')
34
+
35
+ # Boolean handling: true = flag only, false = skip entirely
36
+ if [ "$value" = "false" ]; then continue; fi
37
+
38
+ SERVER_ARGS+=("${ARG_PREFIX}${arg_name}")
39
+ if [ -n "$value" ] && [ "$value" != "true" ]; then
40
+ SERVER_ARGS+=("$value")
41
+ fi
42
+ done
43
+
44
+ echo "-------------------------------------------------------------------"
45
+ echo "TensorRT-LLM engine args: [${SERVER_ARGS[@]}]"
46
+ echo "-------------------------------------------------------------------"
47
+
48
+ # TensorRT-LLM requires the model as a positional argument
49
+ if [ -z "$TRTLLM_MODEL" ]; then
50
+ echo "Error: TRTLLM_MODEL environment variable is not set"
51
+ exit 1
52
+ fi
53
+ exec trtllm-serve serve "$TRTLLM_MODEL" "${SERVER_ARGS[@]}"
@@ -0,0 +1,48 @@
1
+ # ---------------------------------------------------------------------------
2
+ # vLLM Server Configuration
3
+ # ---------------------------------------------------------------------------
4
+ # Env prefix: VLLM_
5
+ # Entrypoint: python3 -m vllm.entrypoints.openai.api_server
6
+ # Port: 8080 (SageMaker requirement)
7
+ # ---------------------------------------------------------------------------
8
+
9
+ PREFIX="VLLM_"
10
+ ARG_PREFIX="--"
11
+
12
+ # Internal variables set by the base image — not CLI args
13
+ EXCLUDE_VARS=("VLLM_USAGE_SOURCE" "VLLM_ENABLE_CUDA_COMPATIBILITY")
14
+
15
+ # Declare and populate array of matching environment variables
16
+ mapfile -t env_vars < <(env | grep "^${PREFIX}")
17
+
18
+ # Convert VLLM_ env vars to CLI arguments
19
+ for var in "${env_vars[@]}"; do
20
+ IFS='=' read -r key value <<< "$var"
21
+
22
+ # Skip excluded variables
23
+ skip=false
24
+ for exclude in "${EXCLUDE_VARS[@]}"; do
25
+ if [ "$key" = "$exclude" ]; then
26
+ skip=true
27
+ break
28
+ fi
29
+ done
30
+ if [ "$skip" = true ]; then continue; fi
31
+
32
+ # Remove prefix, convert to lowercase, replace underscores with dashes
33
+ arg_name=$(echo "${key#"${PREFIX}"}" | tr '[:upper:]' '[:lower:]' | tr '_' '-')
34
+
35
+ # Boolean handling: true = flag only, false = skip entirely
36
+ if [ "$value" = "false" ]; then continue; fi
37
+
38
+ SERVER_ARGS+=("${ARG_PREFIX}${arg_name}")
39
+ if [ -n "$value" ] && [ "$value" != "true" ]; then
40
+ SERVER_ARGS+=("$value")
41
+ fi
42
+ done
43
+
44
+ echo "-------------------------------------------------------------------"
45
+ echo "vLLM engine args: [${SERVER_ARGS[@]}]"
46
+ echo "-------------------------------------------------------------------"
47
+
48
+ exec python3 -m vllm.entrypoints.openai.api_server "${SERVER_ARGS[@]}"