@aws/ml-container-creator 0.12.1 → 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.
Files changed (34) hide show
  1. package/package.json +11 -3
  2. package/servers/instance-sizer/lib/model-resolver.js +127 -185
  3. package/servers/instance-sizer/lib/vram-estimator.js +86 -0
  4. package/servers/lib/catalogs/instances.json +0 -27
  5. package/src/app.js +14 -0
  6. package/src/lib/bootstrap-command-handler.js +2 -2
  7. package/src/lib/generated/cli-options.js +1 -1
  8. package/src/lib/generated/parameter-matrix.js +1 -1
  9. package/src/lib/generated/validation-rules.js +1 -1
  10. package/src/lib/prompt-runner.js +14 -31
  11. package/src/lib/prove-pipeline-executor.js +294 -0
  12. package/templates/IAM_PERMISSIONS.md +64 -13
  13. package/templates/do/.tune_helper.py +5 -2
  14. package/templates/do/README.md +50 -567
  15. package/templates/do/adapter +1 -1
  16. package/templates/do/build +2 -2
  17. package/templates/do/clean.d/async-inference.ejs +2 -2
  18. package/templates/do/clean.d/batch-transform.ejs +2 -2
  19. package/templates/do/clean.d/hyperpod-eks.ejs +2 -2
  20. package/templates/do/clean.d/managed-inference.ejs +2 -2
  21. package/templates/do/deploy.d/async-inference.ejs +6 -6
  22. package/templates/do/deploy.d/batch-transform.ejs +4 -4
  23. package/templates/do/deploy.d/hyperpod-eks.ejs +1 -1
  24. package/templates/do/deploy.d/managed-inference.ejs +15 -3
  25. package/templates/do/lib/profile.sh +19 -15
  26. package/templates/do/lib/staged-assets.sh +217 -0
  27. package/templates/do/push +2 -2
  28. package/templates/do/register +2 -2
  29. package/templates/do/stage +38 -33
  30. package/templates/do/submit +1 -1
  31. package/templates/do/tune +1 -1
  32. package/templates/MIGRATION.md +0 -488
  33. package/templates/TEMPLATE_SYSTEM.md +0 -243
  34. package/templates/do/__pycache__/.benchmark_writer.cpython-312.pyc +0 -0
@@ -1,574 +1,57 @@
1
- # do-framework Scripts
2
-
3
- This directory contains standardized scripts for managing the container lifecycle of your ML deployment project. These scripts follow the [do-framework](https://github.com/iankoulski/do-framework) conventions for consistent, predictable container operations.
1
+ # do/ Scripts
2
+
3
+ Standardized lifecycle scripts for your ML deployment project, following [do-framework](https://github.com/iankoulski/do-framework) conventions.
4
+
5
+ > Full documentation: [awslabs.github.io/ml-container-creator](https://awslabs.github.io/ml-container-creator/)
6
+
7
+ ## Configuration
8
+
9
+ - **Framework**: `<%= framework %>`
10
+ - **Model Server**: `<%= modelServer %>`
11
+ - **Region**: `<%= awsRegion %>`
12
+ - **Instance**: `<%= instanceType %>`
13
+ - **Build Target**: `<%= buildTarget %>`
14
+
15
+ All settings centralized in `do/config`. Override via environment variables.
16
+
17
+ ## Available Scripts
18
+
19
+ | Script | Description |
20
+ |--------|-------------|
21
+ | `./do/build` | Build Docker image locally |
22
+ | `./do/push` | Push image to Amazon ECR |
23
+ | `./do/submit` | Submit remote build to CodeBuild |
24
+ | `./do/stage` | Download and stage model artifacts (HuggingFace → S3) |
25
+ | `./do/deploy` | Deploy endpoint to SageMaker |
26
+ | `./do/add-ic` | Add an inference component to an existing endpoint |
27
+ | `./do/test` | Test local container or live endpoint |
28
+ | `./do/benchmark` | Run SageMaker AI Benchmarking job |
29
+ | `./do/optimize` | Apply model optimizations (quantization, compilation) |
30
+ | `./do/tune` | Run hyperparameter tuning job |
31
+ | `./do/train` | Launch SageMaker training job |
32
+ | `./do/adapter` | Deploy/manage LoRA adapters on a base endpoint |
33
+ | `./do/register` | Register model in SageMaker Model Registry |
34
+ | `./do/manifest` | Generate deployment manifest (multi-model, multi-region) |
35
+ | `./do/export` | Export project configuration as portable archive |
36
+ | `./do/validate` | Validate project structure and configuration |
37
+ | `./do/run` | Run container locally (docker run) |
38
+ | `./do/logs` | Tail CloudWatch logs for endpoint |
39
+ | `./do/status` | Show endpoint/IC status and health |
40
+ | `./do/clean` | Clean up AWS resources (endpoint, ECR, CodeBuild) |
41
+ | `./do/ci` | Run full CI pipeline (build → push → deploy → test) |
42
+ | `./do/config` | Display resolved configuration |
4
43
 
5
44
  ## Quick Start
6
45
 
7
46
  ```bash
8
- # Build Docker image
9
- ./do/build
10
-
11
- # Test locally
12
- ./do/run
13
-
14
- # Push to Amazon ECR
15
- ./do/push
16
-
17
- # Deploy to SageMaker
18
- export ROLE_ARN=arn:aws:iam::ACCOUNT_ID:role/YOUR_ROLE
19
- ./do/deploy
20
-
21
- # Test the endpoint
22
- ./do/test <endpoint-name>
23
-
24
- # Clean up resources
25
- ./do/clean all
26
- ```
27
-
28
- ## Project Configuration
29
-
30
- **Deployment Configuration**: `<%= deploymentConfig %>`
31
- - Framework: `<%= framework %>`
32
- - Model Server: `<%= modelServer %>`
33
- - AWS Region: `<%= awsRegion %>`
34
- - Instance Type: `<%= instanceType %>`
35
- - Build Target: `<%= buildTarget %>`
36
-
37
- All configuration is centralized in `do/config`. You can override any setting by exporting environment variables before running scripts.
38
-
39
- ## Available Commands
40
-
41
- ### `./do/build`
42
-
43
- Build the Docker image for your ML model.
44
-
45
- **What it does:**
46
- - Validates Docker is installed
47
- - Handles framework-specific authentication (e.g., NGC for TensorRT-LLM)
48
- - Builds Docker image with appropriate base image (CPU or GPU)
49
- - Tags image with project name and timestamp
50
-
51
- **Usage:**
52
- ```bash
53
- ./do/build
54
- ```
55
-
56
- <% if (modelServer === 'tensorrt-llm') { %>
57
- **TensorRT-LLM Requirements:**
58
- ```bash
59
- # Set NGC API key before building
60
- export NGC_API_KEY=your_ngc_api_key
61
- ./do/build
62
- ```
63
-
64
- Get your NGC API key from [NVIDIA NGC](https://ngc.nvidia.com/).
65
- <% } %>
66
-
67
- **Output:**
68
- - Docker image: `<%= projectName %>:latest`
69
- - Tagged image: `<%= projectName %>:YYYYMMDD-HHMMSS`
70
-
71
- ---
72
-
73
- ### `./do/push`
74
-
75
- Push the Docker image to Amazon Elastic Container Registry (ECR).
76
-
77
- **What it does:**
78
- - Validates AWS credentials
79
- - Authenticates with ECR
80
- - Creates ECR repository if it doesn't exist
81
- - Pushes all image tags to ECR
82
- - Displays pushed image URIs
83
-
84
- **Prerequisites:**
85
- - AWS credentials configured (`aws configure`)
86
- - Docker image built (`./do/build`)
87
- - IAM permissions for ECR operations
88
-
89
- **Usage:**
90
- ```bash
91
- ./do/push
92
- ```
93
-
94
- **Output:**
95
- - Image URI: `ACCOUNT_ID.dkr.ecr.<%= awsRegion %>.amazonaws.com/ml-container-creator:<%= projectName %>-latest`
96
-
97
- ---
98
-
99
- ### `./do/deploy`
100
-
101
- Deploy the container to AWS SageMaker as a managed endpoint.
102
-
103
- **What it does:**
104
- - Validates AWS credentials and execution role
105
- - Verifies ECR image exists
106
- - Creates SageMaker model
107
- - Creates endpoint configuration
108
- - Creates and waits for endpoint to reach InService status
109
- - Displays endpoint details and test command
110
-
111
- **Prerequisites:**
112
- - AWS credentials configured
113
- - Docker image pushed to ECR (`./do/push`<% if (buildTarget === 'codebuild') { %> or `./do/submit`<% } %>)
114
- - SageMaker execution role ARN
115
-
116
- **Usage:**
117
- ```bash
118
- export ROLE_ARN=arn:aws:iam::ACCOUNT_ID:role/YOUR_SAGEMAKER_ROLE
119
- ./do/deploy
120
- ```
121
-
122
- Or set `ROLE_ARN` in `do/config` to avoid exporting each time.
123
-
124
- **Required IAM Permissions:**
125
-
126
- The execution role must have:
127
- - SageMaker model and endpoint management
128
- - ECR image access
129
- - S3 access (if using model artifacts)
130
- - CloudWatch Logs write access
131
-
132
- **Output:**
133
- - Endpoint name: `<%= projectName %>-endpoint-TIMESTAMP`
134
- - Endpoint status: InService
135
- - Test command: `./do/test <endpoint-name>`
136
-
137
- **Deployment Time:** Typically 5-10 minutes for endpoint to reach InService status.
138
-
139
- ---
140
-
141
- ### `./do/run`
142
-
143
- Run the container locally for testing before deployment.
144
-
145
- **What it does:**
146
- - Detects if GPU support is needed based on deployment configuration
147
- - Starts Docker container with port 8080 exposed
148
- - Mounts model directory if specified
149
- - Streams container logs to console
150
-
151
- **Prerequisites:**
152
- - Docker image built (`./do/build`)
153
- <% if (framework === 'transformers') { %>- NVIDIA Docker runtime (for GPU support)
154
- <% } %>
155
-
156
- **Usage:**
157
- ```bash
158
- ./do/run
159
- ```
160
-
161
- <% if (framework === 'transformers') { %>
162
- **GPU Requirements:**
163
- This deployment configuration requires GPU support. Ensure you have:
164
- - NVIDIA GPU with appropriate drivers
165
- - NVIDIA Container Toolkit installed
166
- - Docker configured to use NVIDIA runtime
167
- <% } %>
168
-
169
- **Testing the local container:**
170
- ```bash
171
- # In another terminal, test the endpoints
172
- ./do/test
173
- ```
174
-
175
- **Stop the container:** Press `Ctrl+C`
176
-
177
- ---
178
-
179
- ### `./do/test`
180
-
181
- Test the container or SageMaker endpoint with sample requests.
182
-
183
- **What it does:**
184
- - Sends health check request to `/ping` endpoint
185
- - Sends sample inference request to `/invocations` endpoint
186
- - Validates responses and displays results
187
- - Supports both local container and SageMaker endpoint testing
188
-
189
- **Usage:**
190
-
191
- Test local container:
192
- ```bash
193
- ./do/test
194
- ```
195
-
196
- Test SageMaker endpoint:
197
- ```bash
198
- ./do/test <endpoint-name>
199
- ```
200
-
201
- **Test Payloads:**
202
-
203
- <% if (framework === 'sklearn' || framework === 'xgboost' || framework === 'tensorflow') { %>
204
- Traditional ML models expect JSON with feature vectors:
205
- ```json
206
- {
207
- "instances": [[1.0, 2.0, 3.0, 4.0]]
208
- }
209
- ```
210
- <% } else if (framework === 'transformers') { %>
211
- Transformer models expect text generation requests:
212
- ```json
213
- {
214
- "inputs": "What is machine learning?",
215
- "parameters": {
216
- "max_new_tokens": 50,
217
- "temperature": 0.7
218
- }
219
- }
220
- ```
221
- <% } %>
222
-
223
- **Exit Codes:**
224
- - `0`: All tests passed
225
- - `1`: Test failed (connection error, HTTP error, or validation error)
226
-
227
- ---
228
-
229
- ### `./do/clean`
230
-
231
- Clean up Docker images and AWS resources.
232
-
233
- **What it does:**
234
- - Removes local Docker images
235
- - Deletes images from ECR
236
- - Deletes SageMaker endpoints, configurations, and models
237
- - Prompts for confirmation before destructive operations
238
-
239
- **Usage:**
240
-
241
- Clean local Docker images:
242
- ```bash
243
- ./do/clean local
244
- ```
245
-
246
- Clean ECR images:
247
- ```bash
248
- ./do/clean ecr
249
- ```
250
-
251
- Clean SageMaker endpoint and related resources:
252
- ```bash
253
- ./do/clean endpoint
254
- ```
255
-
256
- Clean everything:
257
- ```bash
258
- ./do/clean all
259
- ```
260
-
261
- **Warning:** Cleaning operations are destructive and cannot be undone. Always confirm you want to delete resources.
262
-
263
- ---
264
-
265
- <% if (typeof includeBenchmark !== 'undefined' && includeBenchmark) { %>
266
- ### `./do/benchmark`
267
-
268
- Run SageMaker AI Benchmark against deployed endpoint.
269
-
270
- **What it does:**
271
- - Verifies endpoint is InService
272
- - Ensures S3 output bucket exists
273
- - Creates AI workload configuration
274
- - Creates and monitors AI benchmark job
275
- - Displays performance results (throughput, latency P50/P90/P99, TTFT, ITL)
276
-
277
- **Prerequisites:**
278
- - Endpoint deployed and InService (`./do/deploy`)
279
- - AWS credentials configured
280
-
281
- **Usage:**
282
- ```bash
283
- ./do/benchmark
284
- ```
285
-
286
- **Clean up benchmark resources:**
287
- ```bash
288
- ./do/benchmark --clean
47
+ ./do/build # Build image
48
+ ./do/push # Push to ECR
49
+ ./do/deploy # Deploy endpoint
50
+ ./do/test <endpoint> # Test inference
51
+ ./do/clean all # Tear down
289
52
  ```
290
53
 
291
- **Output:**
292
- - Benchmark results summary table
293
- - Detailed results in S3
294
-
295
- ---
296
-
297
- <% } %>
298
- <% if (buildTarget === 'codebuild') { %>
299
- ### `./do/submit`
300
-
301
- Submit a build job to AWS CodeBuild (CodeBuild deployment only).
302
-
303
- **What it does:**
304
- - Creates CodeBuild project if it doesn't exist
305
- - Creates IAM service role for CodeBuild if needed
306
- - Uploads source code to S3
307
- - Starts CodeBuild job that builds AND pushes image to ECR
308
- - Monitors build progress
309
- - Displays ECR image URI on success
310
-
311
- **Prerequisites:**
312
- - AWS credentials configured
313
- - IAM permissions for CodeBuild, S3, and IAM operations
314
-
315
- **Usage:**
316
- ```bash
317
- ./do/submit
318
- ```
319
-
320
- **Important:** When using CodeBuild deployment, `./do/submit` replaces both `./do/build` and `./do/push`. The buildspec.yml handles building the Docker image and pushing it to ECR in the AWS environment.
321
-
322
- **Workflow Comparison:**
323
-
324
- Local/SageMaker deployment:
325
- ```bash
326
- ./do/build # Build locally
327
- ./do/push # Push to ECR
328
- ./do/deploy # Deploy to SageMaker
329
- ```
330
-
331
- CodeBuild deployment:
332
- ```bash
333
- ./do/submit # Build + push via CodeBuild
334
- ./do/deploy # Deploy to SageMaker
335
- ```
336
-
337
- **Build Time:** Typically 5-15 minutes depending on image size and complexity.
338
-
339
- ---
340
-
341
- <% } %>
342
- ## Configuration Reference
343
-
344
- All scripts source configuration from `do/config`. Key variables:
345
-
346
- | Variable | Description | Current Value |
347
- |----------|-------------|---------------|
348
- | `PROJECT_NAME` | Project identifier | `<%= projectName %>` |
349
- | `DEPLOYMENT_CONFIG` | Framework-server combination | `<%= deploymentConfig %>` |
350
- | `FRAMEWORK` | ML framework | `<%= framework %>` |
351
- | `MODEL_SERVER` | Model serving framework | `<%= modelServer %>` |
352
- | `AWS_REGION` | AWS region for deployment | `<%= awsRegion %>` |
353
- | `ECR_REPOSITORY_NAME` | ECR repository name | `ml-container-creator` |
354
- | `INSTANCE_TYPE` | SageMaker instance type | `<%= instanceType %>` |
355
- | `BUILD_TARGET` | Build target | `<%= buildTarget %>` |
356
- <% if (framework === 'transformers') { %>| `MODEL_NAME` | HuggingFace model name | `<%= modelName %>` |
357
- <% } %><% if (modelFormat) { %>| `MODEL_FORMAT` | Model file format | `<%= modelFormat %>` |
358
- <% } %>
359
-
360
- ### Environment Variable Overrides
361
-
362
- You can override any configuration variable by exporting it before running scripts:
363
-
364
- ```bash
365
- # Override AWS region
366
- export AWS_REGION=us-west-2
367
- ./do/deploy
368
-
369
- # Override instance type
370
- export INSTANCE_TYPE=ml.g5.2xlarge
371
- ./do/deploy
372
-
373
- # Override ECR repository name
374
- export ECR_REPOSITORY_NAME=my-custom-repo
375
- ./do/push
376
- ```
377
-
378
- ## Troubleshooting
379
-
380
- ### Build Issues
381
-
382
- **Docker not found:**
383
- ```
384
- ❌ Docker is not installed
385
- ```
386
- Install Docker from [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/)
387
-
388
- <% if (modelServer === 'tensorrt-llm') { %>
389
- **NGC authentication failed:**
390
- ```
391
- ❌ NGC_API_KEY environment variable not set
392
- ```
393
- Get your NGC API key from [https://ngc.nvidia.com/](https://ngc.nvidia.com/) and export it:
394
- ```bash
395
- export NGC_API_KEY=your_key_here
396
- ```
397
- <% } %>
398
-
399
- ### Push Issues
400
-
401
- **AWS credentials not configured:**
402
- ```
403
- ❌ AWS credentials not configured
404
- ```
405
- Run `aws configure` or set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables.
406
-
407
- **ECR authentication failed:**
408
- ```
409
- ❌ Failed to authenticate with ECR
410
- ```
411
- Ensure your IAM user/role has `ecr:GetAuthorizationToken` permission.
412
-
413
- ### Deploy Issues
414
-
415
- **Execution role not provided:**
416
- ```
417
- ❌ Execution role ARN not provided
418
- ```
419
- Export the role ARN:
420
- ```bash
421
- export ROLE_ARN=arn:aws:iam::ACCOUNT_ID:role/YOUR_ROLE
422
- ```
423
-
424
- **ECR image not found:**
425
- ```
426
- ❌ ECR image not found
427
- ```
428
- <% if (buildTarget === 'codebuild') { %>Run `./do/submit` to build and push the image via CodeBuild.
429
- <% } else { %>Run `./do/build` and `./do/push` to build and push the image.
430
- <% } %>
431
-
432
- **Endpoint creation failed:**
433
- ```
434
- ❌ Failed to create endpoint
435
- ```
436
- Check:
437
- - Instance type is available in your region
438
- - You have sufficient service quota for the instance type
439
- - The execution role has correct permissions
440
- - CloudWatch Logs for detailed error messages
441
-
442
- ### Test Issues
443
-
444
- **Local container not responding:**
445
- ```
446
- ❌ Could not connect to local container
447
- ```
448
- Ensure the container is running: `./do/run`
449
-
450
- **SageMaker endpoint not InService:**
451
- ```
452
- ❌ Endpoint is not InService
453
- ```
454
- Wait for endpoint to finish deploying. Check status:
455
- ```bash
456
- aws sagemaker describe-endpoint --endpoint-name <endpoint-name> --region <%= awsRegion %>
457
- ```
458
-
459
- <% if (framework === 'transformers') { %>
460
- ### GPU Issues
461
-
462
- **NVIDIA runtime not found:**
463
- ```
464
- ❌ NVIDIA Container Toolkit not installed
465
- ```
466
- Install NVIDIA Container Toolkit: [https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)
467
-
468
- **Out of GPU memory:**
469
- ```
470
- ❌ CUDA out of memory
471
- ```
472
- Try:
473
- - Using a larger instance type with more GPU memory
474
- - Reducing batch size or model size
475
- - Using model quantization
476
- <% } %>
477
-
478
- ## Workflow Examples
479
-
480
- ### Development Workflow
481
-
482
- 1. **Build and test locally:**
483
- ```bash
484
- ./do/build
485
- ./do/run &
486
- ./do/test
487
- ```
488
-
489
- 2. **Deploy to SageMaker:**
490
- ```bash
491
- <% if (buildTarget === 'codebuild') { %>./do/submit<% } else { %>./do/push<% } %>
492
- export ROLE_ARN=arn:aws:iam::ACCOUNT_ID:role/YOUR_ROLE
493
- ./do/deploy
494
- ```
495
-
496
- 3. **Test the endpoint:**
497
- ```bash
498
- ./do/test <endpoint-name>
499
- ```
500
-
501
- 4. **Clean up when done:**
502
- ```bash
503
- ./do/clean endpoint
504
- ```
505
-
506
- ### CI/CD Workflow
507
-
508
- <% if (buildTarget === 'codebuild') { %>
509
- ```bash
510
- # In your CI/CD pipeline
511
- ./do/submit # Build and push via CodeBuild
512
- ./do/deploy # Deploy to SageMaker
513
- ./do/test <endpoint-name> # Validate deployment
514
- ```
515
- <% } else { %>
516
- ```bash
517
- # In your CI/CD pipeline
518
- ./do/build # Build image
519
- ./do/push # Push to ECR
520
- ./do/deploy # Deploy to SageMaker
521
- ./do/test <endpoint-name> # Validate deployment
522
- ```
523
- <% } %>
524
-
525
- ### Iterative Development
526
-
527
- ```bash
528
- # Make code changes
529
- vim code/model_handler.py
530
-
531
- # Rebuild and test
532
- ./do/build
533
- ./do/run &
534
- ./do/test
535
-
536
- # Deploy updated version
537
- <% if (buildTarget === 'codebuild') { %>./do/submit<% } else { %>./do/push<% } %>
538
- ./do/deploy
539
- ```
540
-
541
- ## Relationship to Legacy Scripts
542
-
543
- The `deploy/` directory contains legacy wrapper scripts for backward compatibility:
544
-
545
- | Legacy Script | do-framework Equivalent | Status |
546
- |---------------|------------------------|--------|
547
- | `deploy/build_and_push.sh` | `./do/build && ./do/push` | Deprecated |
548
- | `deploy/deploy.sh` | `./do/deploy` | Deprecated |
549
- <% if (buildTarget === 'codebuild') { %>| `deploy/submit_build.sh` | `./do/submit` | Deprecated |
550
- <% } %>
551
-
552
- **Migration:** The legacy scripts display deprecation warnings and forward to do-framework scripts. Update your workflows to use `do/` scripts directly.
553
-
554
- See [MIGRATION.md](../MIGRATION.md) for detailed migration instructions.
555
-
556
- ## Additional Resources
557
-
558
- - **Main Project README**: [../README.md](../README.md)
559
- - **Migration Guide**: [../MIGRATION.md](../MIGRATION.md)
560
- - **do-framework**: [https://github.com/iankoulski/do-framework](https://github.com/iankoulski/do-framework)
561
- - **AWS SageMaker BYOC**: [https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html](https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html)
562
- - **Docker Documentation**: [https://docs.docker.com/](https://docs.docker.com/)
563
-
564
- ## Getting Help
565
-
566
- If you encounter issues:
567
-
568
- 1. Check the troubleshooting section above
569
- 2. Review CloudWatch Logs for SageMaker endpoints
570
- 3. Verify IAM permissions and AWS credentials
571
- 4. Ensure prerequisites are installed and configured
572
- 5. Check the main project README for additional guidance
54
+ ## See Also
573
55
 
574
- For bugs or feature requests, please open an issue in the project repository.
56
+ - [`IAM_PERMISSIONS.md`](../IAM_PERMISSIONS.md) Required IAM permissions per script
57
+ - [Full docs](https://awslabs.github.io/ml-container-creator/) — Architecture, tutorials, API reference
@@ -21,7 +21,7 @@ source "${SCRIPT_DIR}/config"
21
21
  source "${SCRIPT_DIR}/lib/profile.sh"
22
22
 
23
23
  # ── Profile-resolved variables (env var > profile > default) ──────────────────
24
- ADAPTER_S3_BUCKET="${ADAPTER_S3_BUCKET:-mlcc-adapters-${_PROFILE[accountId]:-unknown}-${_PROFILE[awsRegion]:-us-east-1}}"
24
+ ADAPTER_S3_BUCKET="${ADAPTER_S3_BUCKET:-mlcc-adapters-${_PROFILE_accountId:-unknown}-${_PROFILE_awsRegion:-us-east-1}}"
25
25
 
26
26
  source "${SCRIPT_DIR}/lib/wait.sh"
27
27
 
@@ -12,8 +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
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
16
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
15
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
16
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
17
17
 
18
18
  echo "🚀 Building Docker image for ${PROJECT_NAME}"
19
19
  echo " Deployment config: ${DEPLOYMENT_CONFIG}"
@@ -12,8 +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
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
16
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
15
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
16
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
17
17
 
18
18
  # Parse arguments
19
19
  CLEANUP_TARGET=""
@@ -12,8 +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
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
16
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
15
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
16
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
17
17
 
18
18
  # Parse arguments
19
19
  CLEANUP_TARGET=""
@@ -12,8 +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
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
16
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
15
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
16
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
17
17
 
18
18
  # Parse arguments
19
19
  CLEANUP_TARGET=""
@@ -12,8 +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
- ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE[ecrRepositoryName]:-ml-container-creator}}"
16
- export AWS_REGION="${AWS_REGION:-${_PROFILE[awsRegion]:-us-east-1}}"
15
+ ECR_REPOSITORY_NAME="${ECR_REPOSITORY_NAME:-${_PROFILE_ecrRepositoryName:-ml-container-creator}}"
16
+ export AWS_REGION="${AWS_REGION:-${_PROFILE_awsRegion:-us-east-1}}"
17
17
 
18
18
  # Parse arguments
19
19
  CLEANUP_TARGET=""