@aws/ml-container-creator 0.13.3 → 0.13.4

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.
@@ -12,11 +12,8 @@ source "${SCRIPT_DIR}/config"
12
12
  source "${SCRIPT_DIR}/lib/profile.sh"
13
13
 
14
14
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
15
- # Disable unbound-variable checking for associative array access (bash 3.2 compat)
16
- set +u
17
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
18
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
19
- set -u
15
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
16
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
20
17
 
21
18
  # Parse arguments
22
19
  CLEANUP_TARGET=""
@@ -12,11 +12,8 @@ source "${SCRIPT_DIR}/config"
12
12
  source "${SCRIPT_DIR}/lib/profile.sh"
13
13
 
14
14
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
15
- # Disable unbound-variable checking for associative array access (bash 3.2 compat)
16
- set +u
17
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
18
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
19
- set -u
15
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
16
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
20
17
 
21
18
  # Parse arguments
22
19
  CLEANUP_TARGET=""
@@ -12,11 +12,8 @@ source "${SCRIPT_DIR}/config"
12
12
  source "${SCRIPT_DIR}/lib/profile.sh"
13
13
 
14
14
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
15
- # Disable unbound-variable checking for associative array access (bash 3.2 compat)
16
- set +u
17
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
18
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
19
- set -u
15
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
16
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
20
17
 
21
18
  # Parse arguments
22
19
  CLEANUP_TARGET=""
@@ -41,18 +41,15 @@ source "${SCRIPT_DIR}/config"
41
41
  source "${SCRIPT_DIR}/lib/profile.sh"
42
42
 
43
43
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
44
- # Disable unbound-variable checking for associative array access (bash 3.2 compat)
45
- set +u
46
- ROLE_ARN="${ROLE_ARN:-${_PROFILE[roleArn]:-}}"
47
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
48
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
44
+ ROLE_ARN="${ROLE_ARN:-${_PROFILE_roleArn:-}}"
45
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
46
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
49
47
 
50
48
  # Async-specific derived variables
51
- _ASYNC_BUCKET="${_PROFILE[asyncS3Bucket]:-mlcc-async-${_PROFILE[accountId]:-unknown}-${_PROFILE[awsRegion]:-us-east-1}}"
49
+ _ASYNC_BUCKET="${_PROFILE_asyncS3Bucket:-mlcc-async-${_PROFILE_accountId:-unknown}-${_PROFILE_awsRegion:-us-east-1}}"
52
50
  ASYNC_S3_OUTPUT_PATH="${ASYNC_S3_OUTPUT_PATH:-s3://${_ASYNC_BUCKET}/${PROJECT_NAME}/output/}"
53
- ASYNC_SNS_SUCCESS_TOPIC="${ASYNC_SNS_SUCCESS_TOPIC:-arn:aws:sns:${_PROFILE[awsRegion]:-us-east-1}:${_PROFILE[accountId]:-unknown}:ml-container-creator-${PROJECT_NAME}-async-success}"
54
- ASYNC_SNS_ERROR_TOPIC="${ASYNC_SNS_ERROR_TOPIC:-arn:aws:sns:${_PROFILE[awsRegion]:-us-east-1}:${_PROFILE[accountId]:-unknown}:ml-container-creator-${PROJECT_NAME}-async-error}"
55
- set -u
51
+ ASYNC_SNS_SUCCESS_TOPIC="${ASYNC_SNS_SUCCESS_TOPIC:-arn:aws:sns:${_PROFILE_awsRegion:-us-east-1}:${_PROFILE_accountId:-unknown}:ml-container-creator-${PROJECT_NAME}-async-success}"
52
+ ASYNC_SNS_ERROR_TOPIC="${ASYNC_SNS_ERROR_TOPIC:-arn:aws:sns:${_PROFILE_awsRegion:-us-east-1}:${_PROFILE_accountId:-unknown}:ml-container-creator-${PROJECT_NAME}-async-error}"
56
53
 
57
54
  echo "🚀 Deploying to AWS"
58
55
  echo " Project: ${PROJECT_NAME}"
@@ -41,17 +41,14 @@ source "${SCRIPT_DIR}/config"
41
41
  source "${SCRIPT_DIR}/lib/profile.sh"
42
42
 
43
43
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
44
- # Disable unbound-variable checking for associative array access (bash 3.2 compat)
45
- set +u
46
- ROLE_ARN="${ROLE_ARN:-${_PROFILE[roleArn]:-}}"
47
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
48
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
44
+ ROLE_ARN="${ROLE_ARN:-${_PROFILE_roleArn:-}}"
45
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
46
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
49
47
 
50
48
  # Batch-specific derived variables
51
- _BATCH_BUCKET="${_PROFILE[batchS3Bucket]:-mlcc-batch-${_PROFILE[accountId]:-unknown}-${_PROFILE[awsRegion]:-us-east-1}}"
49
+ _BATCH_BUCKET="${_PROFILE_batchS3Bucket:-mlcc-batch-${_PROFILE_accountId:-unknown}-${_PROFILE_awsRegion:-us-east-1}}"
52
50
  BATCH_INPUT_PATH="${BATCH_INPUT_PATH:-s3://${_BATCH_BUCKET}/${PROJECT_NAME}/input/}"
53
51
  BATCH_OUTPUT_PATH="${BATCH_OUTPUT_PATH:-s3://${_BATCH_BUCKET}/${PROJECT_NAME}/output/}"
54
- set -u
55
52
 
56
53
  echo "🚀 Deploying to AWS"
57
54
  echo " Project: ${PROJECT_NAME}"
@@ -41,10 +41,7 @@ source "${SCRIPT_DIR}/config"
41
41
  source "${SCRIPT_DIR}/lib/profile.sh"
42
42
 
43
43
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
44
- # Disable unbound-variable checking for associative array access (bash 3.2 compat)
45
- set +u
46
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
47
- set -u
44
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
48
45
 
49
46
  echo "🚀 Deploying to AWS"
50
47
  echo " Project: ${PROJECT_NAME}"
@@ -214,12 +214,9 @@ source "${SCRIPT_DIR}/config"
214
214
  source "${SCRIPT_DIR}/lib/profile.sh"
215
215
 
216
216
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
217
- # Disable unbound-variable checking for associative array access (bash 3.2 compat)
218
- set +u
219
- ROLE_ARN="${ROLE_ARN:-${_PROFILE[roleArn]:-}}"
220
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
221
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
222
- set -u
217
+ ROLE_ARN="${ROLE_ARN:-${_PROFILE_roleArn:-}}"
218
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
219
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
223
220
 
224
221
  echo "🚀 Deploying to AWS"
225
222
  echo " Project: ${PROJECT_NAME}"
@@ -332,6 +329,18 @@ if [ -z "${ROLE_ARN:-}" ]; then
332
329
  exit 3
333
330
  fi
334
331
 
332
+ # Validate ROLE_ARN looks like an IAM role ARN
333
+ if ! echo "${ROLE_ARN}" | grep -qE '^arn:aws[a-z-]*:iam::[0-9]{12}:role/.+'; then
334
+ echo "❌ ROLE_ARN is not a valid IAM role ARN:"
335
+ echo " Got: ${ROLE_ARN}"
336
+ echo " Expected format: arn:aws:iam::123456789012:role/RoleName"
337
+ echo ""
338
+ echo " This may indicate a misconfigured bootstrap profile."
339
+ echo " Check ~/.ml-container-creator/config.json 'roleArn' field,"
340
+ echo " or set the correct value: export ROLE_ARN=arn:aws:iam::ACCOUNT:role/YOUR_ROLE"
341
+ exit 3
342
+ fi
343
+
335
344
  echo " Using execution role: ${ROLE_ARN}"
336
345
 
337
346
  # Validate --ic argument if specified (set by --ic <name> or --force-ic <name>)
@@ -1,21 +1,27 @@
1
1
  #!/usr/bin/env bash
2
- # Profile loader — reads active bootstrap profile into _PROFILE[] associative array.
2
+ # Profile loader — reads active bootstrap profile into _PROFILE_<key> variables.
3
3
  # Source this file after do/config. Values provide defaults; explicit env vars take precedence.
4
4
  #
5
- # Requires bash 4+ for associative array support.
6
- # macOS ships with bash 3.2 — install bash 4+ via Homebrew: brew install bash
5
+ # POSIX-compatible: works on bash 3.2+ (macOS default) and bash 4+/5+.
6
+ # No associative arrays required.
7
7
  #
8
- # Expected keys in _PROFILE:
8
+ # After sourcing, access values via:
9
+ # ${_PROFILE_roleArn:-}
10
+ # ${_PROFILE_ecrRepositoryName:-ml-container-creator}
11
+ # ${_PROFILE_awsRegion:-us-east-1}
12
+ # ${_PROFILE_accountId:-}
13
+ # ${_PROFILE_benchmarkS3Bucket:-}
14
+ # ${_PROFILE_asyncS3Bucket:-}
15
+ # ${_PROFILE_batchS3Bucket:-}
16
+ #
17
+ # Expected keys (set as _PROFILE_<key>):
9
18
  # awsRegion, accountId, awsProfile, roleArn, ecrRepositoryName,
10
19
  # benchmarkS3Bucket, ciBenchmarkResultsBucket, asyncS3Bucket, batchS3Bucket,
11
20
  # ciTableName, ciInfraProvisioned
12
21
 
13
22
  # Temporarily disable unbound variable checking for profile loading
14
- # (keys may not exist in the profile config, and declare -A behavior
15
- # varies across bash versions with set -u)
16
23
  set +u 2>/dev/null || true
17
24
 
18
- declare -A _PROFILE 2>/dev/null || true
19
25
  if command -v python3 &>/dev/null; then
20
26
  _PROFILE_RAW=$(python3 -c "
21
27
  import json, os
@@ -23,22 +29,20 @@ try:
23
29
  with open(os.path.expanduser('~/.ml-container-creator/config.json')) as f:
24
30
  c = json.load(f)
25
31
  p = c['profiles'][c['activeProfile']]
26
- # Output as KEY=VALUE lines (simple, no JSON parsing in bash)
32
+ # Output as _PROFILE_KEY=VALUE lines safe for eval with known prefix
27
33
  for k, v in p.items():
28
34
  if isinstance(v, (str, int, float, bool)):
29
- print(f'{k}={v}')
35
+ # Sanitize: only allow alphanumeric key names
36
+ if k.isalnum() or all(c.isalnum() or c == '_' for c in k):
37
+ print(f'_PROFILE_{k}=\"{v}\"')
30
38
  except:
31
39
  pass
32
40
  " 2>/dev/null) || _PROFILE_RAW=""
33
41
 
34
42
  if [ -n "${_PROFILE_RAW}" ]; then
35
- while IFS='=' read -r key value; do
36
- [ -n "${key}" ] && _PROFILE["${key}"]="${value}"
37
- done <<< "${_PROFILE_RAW}"
43
+ eval "${_PROFILE_RAW}"
38
44
  fi
39
45
  fi
40
46
 
41
47
  # NOTE: set -u is NOT re-enabled here. The caller is responsible for managing
42
- # their own shell options. Re-enabling set -u would cause "unbound variable"
43
- # errors when accessing _PROFILE keys on bash versions where empty associative
44
- # arrays are treated as unset (bash 5.x on some platforms).
48
+ # their own shell options.
package/templates/do/push CHANGED
@@ -12,11 +12,8 @@ source "${SCRIPT_DIR}/config"
12
12
  source "${SCRIPT_DIR}/lib/profile.sh"
13
13
 
14
14
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
15
- # Disable unbound-variable checking for associative array access (bash 3.2 compat)
16
- set +u
17
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
18
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
19
- set -u
15
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
16
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
20
17
 
21
18
  echo "🚀 Pushing Docker image to Amazon ECR"
22
19
  echo " Project: ${PROJECT_NAME}"
@@ -12,11 +12,8 @@ source "${SCRIPT_DIR}/config"
12
12
  source "${SCRIPT_DIR}/lib/profile.sh"
13
13
 
14
14
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
15
- # Disable unbound-variable checking for associative array access (bash 3.2 compat)
16
- set +u
17
- ROLE_ARN="${ROLE_ARN:-${_PROFILE[roleArn]:-}}"
18
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
19
- set -u
15
+ ROLE_ARN="${ROLE_ARN:-${_PROFILE_roleArn:-}}"
16
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
20
17
 
21
18
  # ============================================================
22
19
  # Register deployment to the deployment registry
@@ -28,37 +28,37 @@ source "${SCRIPT_DIR}/lib/staged-assets.sh"
28
28
 
29
29
  # ── Parse flags ───────────────────────────────────────────────────────────────
30
30
  FORCE=false
31
- UPDATE_CONFIG=false
31
+ UPDATE_CONFIG=true
32
32
  SUBMIT_MODE=false
33
33
  NO_WAIT=false
34
34
  while [ $# -gt 0 ]; do
35
35
  case "$1" in
36
36
  --force) FORCE=true; shift ;;
37
- --update-config) UPDATE_CONFIG=true; shift ;;
37
+ --update-config) UPDATE_CONFIG=true; shift ;; # default, kept for backward compat
38
+ --no-update-config) UPDATE_CONFIG=false; shift ;;
38
39
  --submit) SUBMIT_MODE=true; shift ;;
39
40
  --no-wait) NO_WAIT=true; shift ;;
40
41
  --help|-h)
41
- echo "Usage: ./do/stage [--force] [--update-config] [--submit] [--no-wait]"
42
+ echo "Usage: ./do/stage [--force] [--no-update-config] [--submit] [--no-wait]"
42
43
  echo ""
43
44
  echo "Pre-stage model weights from HuggingFace to S3."
45
+ echo "On success, updates MODEL_NAME in do/config so subsequent tasks"
46
+ echo "(submit, deploy) pull from S3 with HuggingFace as fallback."
44
47
  echo ""
45
48
  echo "Modes:"
46
49
  echo " (default) Download locally then sync to S3"
47
50
  echo " --submit Submit as SageMaker Processing Job (for models >500GB)"
48
51
  echo ""
49
52
  echo "Options:"
50
- echo " --force Re-stage even if model already exists in S3"
51
- echo " --update-config Update MODEL_NAME in do/config to the staged S3 URI"
52
- echo " --no-wait (with --submit) Exit without polling for completion"
53
+ echo " --force Re-stage even if model already exists in S3"
54
+ echo " --no-update-config Do NOT update MODEL_NAME in do/config after staging"
55
+ echo " --no-wait (with --submit) Exit without polling for completion"
53
56
  echo ""
54
57
  echo "Environment:"
55
58
  echo " HF_TOKEN HuggingFace token (for gated models)"
56
59
  echo ""
57
60
  echo "The staged S3 URI will be printed on completion."
58
- echo "Pass --update-config to automatically update do/config for S3-backed deploys."
59
- echo ""
60
- echo "The --submit mode uses a SageMaker Processing Job with 2TB attached"
61
- echo "storage, suitable for very large models that exceed local disk capacity."
61
+ echo "MODEL_NAME in do/config is updated automatically unless --no-update-config is passed."
62
62
  exit 0
63
63
  ;;
64
64
  *) shift ;;
@@ -128,11 +128,16 @@ echo "Target: ${S3_OUTPUT_URI}"
128
128
  echo ""
129
129
 
130
130
  # Install dependencies
131
- echo "📦 Installing huggingface-cli and hf_transfer..."
132
- pip install -q huggingface_hub[cli] hf_transfer
131
+ echo "📦 Checking huggingface-cli and hf_transfer..."
132
+ pip install -q huggingface_hub[cli] hf_transfer 2>/dev/null || true
133
133
 
134
- # Enable fast parallel downloads
135
- export HF_HUB_ENABLE_HF_TRANSFER=1
134
+ # Enable fast parallel downloads only if hf_transfer is available
135
+ if python3 -c "import hf_transfer" 2>/dev/null; then
136
+ export HF_HUB_ENABLE_HF_TRANSFER=1
137
+ else
138
+ echo " ℹ️ hf_transfer not available — using standard download (install with: pip install hf_transfer)"
139
+ unset HF_HUB_ENABLE_HF_TRANSFER 2>/dev/null || true
140
+ fi
136
141
 
137
142
  # Set HF token if provided
138
143
  if [ -n "${HF_TOKEN:-}" ]; then
@@ -326,15 +331,11 @@ print(d.get('FailureReason', ''))
326
331
  CONFIG_FILE="${SCRIPT_DIR}/config"
327
332
  sed -i.bak "s|^export MODEL_NAME=.*|export MODEL_NAME=\"${MODEL_S3_URI}\"|" "${CONFIG_FILE}"
328
333
  rm -f "${CONFIG_FILE}.bak"
329
- echo " ✅ Updated MODEL_NAME in do/config → ${MODEL_S3_URI}"
330
- echo ""
331
- echo " Re-deploy with S3-backed model: ./do/deploy"
334
+ echo " ✅ Updated MODEL_NAME in do/config → S3-backed"
335
+ echo " Subsequent tasks (submit, deploy) will pull from S3."
332
336
  else
333
337
  echo " To use this staged model, update do/config:"
334
338
  echo " export MODEL_NAME=\"${MODEL_S3_URI}\""
335
- echo ""
336
- echo " Or re-run with --update-config:"
337
- echo " ./do/stage --submit --update-config"
338
339
  fi
339
340
  return 0
340
341
  ;;
@@ -433,7 +434,7 @@ if [ "${FORCE}" = false ]; then
433
434
  CONFIG_FILE="${SCRIPT_DIR}/config"
434
435
  sed -i.bak "s|^export MODEL_NAME=.*|export MODEL_NAME=\"${MODEL_S3_URI}\"|" "${CONFIG_FILE}"
435
436
  rm -f "${CONFIG_FILE}.bak"
436
- echo " ✅ Updated MODEL_NAME in do/config → ${MODEL_S3_URI}"
437
+ echo " ✅ Updated MODEL_NAME in do/config → S3-backed"
437
438
  else
438
439
  echo " To use this staged model, set in do/config:"
439
440
  echo " export MODEL_NAME=\"${MODEL_S3_URI}\""
@@ -474,13 +475,21 @@ fi
474
475
 
475
476
  # ── Download model from HuggingFace ──────────────────────────────────────────
476
477
  echo "⬇️ Downloading model from HuggingFace: ${MODEL_NAME}"
477
- echo " Using hf_transfer for fast parallel downloads..."
478
+ if python3 -c "import hf_transfer" 2>/dev/null; then
479
+ echo " Using hf_transfer for fast parallel downloads..."
480
+ else
481
+ echo " Using standard downloads (install hf_transfer for faster staging)..."
482
+ fi
478
483
  echo ""
479
484
 
480
- # Enable fast parallel downloads via hf_transfer
481
- export HF_HUB_ENABLE_HF_TRANSFER=1
485
+ # Enable fast parallel downloads via hf_transfer (if available)
486
+ if python3 -c "import hf_transfer" 2>/dev/null; then
487
+ export HF_HUB_ENABLE_HF_TRANSFER=1
488
+ else
489
+ unset HF_HUB_ENABLE_HF_TRANSFER 2>/dev/null || true
490
+ fi
482
491
 
483
- # Download to HF cache (huggingface-cli manages cache location)
492
+ # Download to HF cache
484
493
  DOWNLOAD_ARGS=("${MODEL_NAME}")
485
494
  if [ -n "${HF_TOKEN:-}" ]; then
486
495
  DOWNLOAD_ARGS+=("--token" "${HF_TOKEN}")
@@ -555,15 +564,9 @@ if [ "${UPDATE_CONFIG}" = true ]; then
555
564
  CONFIG_FILE="${SCRIPT_DIR}/config"
556
565
  sed -i.bak "s|^export MODEL_NAME=.*|export MODEL_NAME=\"${MODEL_S3_URI}\"|" "${CONFIG_FILE}"
557
566
  rm -f "${CONFIG_FILE}.bak"
558
- echo " ✅ Updated MODEL_NAME in do/config → ${MODEL_S3_URI}"
559
- echo ""
560
- echo " Re-deploy with S3-backed model: ./do/deploy"
567
+ echo " ✅ Updated MODEL_NAME in do/config → S3-backed"
568
+ echo " Subsequent tasks (submit, deploy) will pull from S3."
561
569
  else
562
570
  echo " To use this staged model, update do/config:"
563
571
  echo " export MODEL_NAME=\"${MODEL_S3_URI}\""
564
- echo ""
565
- echo " Or re-run with --update-config to do it automatically:"
566
- echo " ./do/stage --update-config"
567
- echo ""
568
- echo " Then re-deploy: ./do/deploy"
569
572
  fi
@@ -12,10 +12,7 @@ source "${SCRIPT_DIR}/config"
12
12
  source "${SCRIPT_DIR}/lib/profile.sh"
13
13
 
14
14
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
15
- # Disable unbound-variable checking for associative array access (bash 3.2 compat)
16
- set +u
17
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
18
- set -u
15
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
19
16
 
20
17
  # ── Derived variables (env var > computed default) ────────────────────────────
21
18
  CODEBUILD_PROJECT_NAME="${CODEBUILD_PROJECT_NAME:-${PROJECT_NAME}-build-$(date +%Y%m%d)}"
package/templates/do/tune CHANGED
@@ -16,10 +16,7 @@ source "${SCRIPT_DIR}/config"
16
16
  source "${SCRIPT_DIR}/lib/profile.sh"
17
17
 
18
18
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
19
- # Disable unbound-variable checking for associative array access (bash 3.2 compat)
20
- set +u
21
- TUNE_S3_BUCKET="${TUNE_S3_BUCKET:-mlcc-tune-${_PROFILE[accountId]:-unknown}-${_PROFILE[awsRegion]:-us-east-1}}"
22
- set -u
19
+ TUNE_S3_BUCKET="${TUNE_S3_BUCKET:-mlcc-tune-${_PROFILE_accountId:-unknown}-${_PROFILE_awsRegion:-us-east-1}}"
23
20
 
24
21
  # ── Constants ─────────────────────────────────────────────────────────────────
25
22
  CATALOG_FILE="${SCRIPT_DIR}/.tune_catalog.json"