@aws/ml-container-creator 0.2.4 → 0.2.6
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.
- package/README.md +62 -298
- package/bin/cli.js +7 -2
- package/package.json +7 -8
- package/servers/base-image-picker/index.js +3 -3
- package/servers/base-image-picker/manifest.json +4 -2
- package/servers/instance-sizer/index.js +561 -0
- package/servers/instance-sizer/lib/instance-ranker.js +245 -0
- package/servers/instance-sizer/lib/model-resolver.js +265 -0
- package/servers/instance-sizer/lib/vram-estimator.js +177 -0
- package/servers/instance-sizer/manifest.json +17 -0
- package/servers/instance-sizer/package.json +15 -0
- package/servers/{instance-recommender → lib}/catalogs/instances.json +136 -34
- package/servers/{base-image-picker → lib}/catalogs/model-servers.json +19 -249
- package/servers/lib/catalogs/model-sizes.json +131 -0
- package/servers/lib/catalogs/models.json +602 -0
- package/servers/{model-picker → lib}/catalogs/popular-diffusors.json +32 -10
- package/servers/{model-picker → lib}/catalogs/popular-transformers.json +59 -26
- package/servers/{base-image-picker → lib}/catalogs/python-slim.json +12 -12
- package/servers/lib/schemas/image-catalog.schema.json +0 -12
- package/servers/lib/schemas/instances.schema.json +29 -0
- package/servers/lib/schemas/model-catalog.schema.json +12 -10
- package/servers/lib/schemas/unified-model-catalog.schema.json +129 -0
- package/servers/model-picker/index.js +2 -3
- package/servers/model-picker/manifest.json +2 -3
- package/servers/region-picker/index.js +1 -1
- package/servers/region-picker/manifest.json +1 -1
- package/src/app.js +17 -0
- package/src/lib/bootstrap-command-handler.js +38 -0
- package/src/lib/cli-handler.js +3 -3
- package/src/lib/config-manager.js +4 -1
- package/src/lib/configuration-manager.js +2 -2
- package/src/lib/cross-cutting-checker.js +341 -0
- package/src/lib/dry-run-validator.js +78 -0
- package/src/lib/generation-validator.js +102 -0
- package/src/lib/mcp-validator-config.js +89 -0
- package/src/lib/payload-builder.js +153 -0
- package/src/lib/prompt-runner.js +445 -135
- package/src/lib/prompts.js +1 -1
- package/src/lib/registry-loader.js +5 -5
- package/src/lib/schema-sync.js +203 -0
- package/src/lib/schema-validation-engine.js +195 -0
- package/src/lib/service-model-parser.js +102 -0
- package/src/lib/validate-runner.js +167 -0
- package/src/lib/validation-report.js +133 -0
- package/src/lib/validators/base-validator.js +36 -0
- package/src/lib/validators/catalog-validator.js +177 -0
- package/src/lib/validators/enum-validator.js +120 -0
- package/src/lib/validators/required-field-validator.js +150 -0
- package/src/lib/validators/type-validator.js +313 -0
- package/templates/Dockerfile +1 -1
- package/templates/do/build +15 -5
- package/templates/do/run +5 -1
- package/templates/do/validate +61 -0
- package/servers/instance-recommender/LICENSE +0 -202
- package/servers/instance-recommender/index.js +0 -284
- package/servers/instance-recommender/manifest.json +0 -16
- package/servers/instance-recommender/package.json +0 -15
- /package/servers/{model-picker → lib}/catalogs/jumpstart-public.json +0 -0
- /package/servers/{region-picker → lib}/catalogs/regions.json +0 -0
- /package/servers/{base-image-picker → lib}/catalogs/triton-backends.json +0 -0
- /package/servers/{base-image-picker → lib}/catalogs/triton.json +0 -0
package/README.md
CHANGED
|
@@ -1,342 +1,106 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ML Container Creator
|
|
2
2
|
|
|
3
|
-
SageMaker-compatible
|
|
3
|
+
A CLI tool that creates SageMaker-compatible Docker containers for deploying ML models using the Bring Your Own Container (BYOC) paradigm.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **Note:** This is a pre-release (`0.x`). APIs may change between minor versions. Weekly releases are planned until v1.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
### 1. Build the Container
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
./do/build
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Builds a Docker image tagged as `sharp-transformer-deployment:latest`.
|
|
16
|
-
|
|
17
|
-
### 2. Test Locally
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
# Start the container
|
|
21
|
-
./do/run
|
|
22
|
-
|
|
23
|
-
# In another terminal, test the endpoints
|
|
24
|
-
./do/test
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### 3. Push to ECR
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
./do/push
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Pushes the image to Amazon ECR in the `us-west-2` region.
|
|
34
|
-
|
|
35
|
-
### 4. Deploy to SageMaker
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
./do/deploy <your-sagemaker-execution-role-arn>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Creates a SageMaker endpoint named `sharp-transformer-deployment-endpoint`.
|
|
42
|
-
|
|
43
|
-
### 5. Test the Endpoint
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
./do/test sharp-transformer-deployment-endpoint
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Project Structure
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
sharp-transformer-deployment/
|
|
53
|
-
├── do/ # do-framework lifecycle scripts
|
|
54
|
-
│ ├── build # Build Docker image
|
|
55
|
-
│ ├── push # Push to Amazon ECR
|
|
56
|
-
│ ├── deploy # Deploy to SageMaker
|
|
57
|
-
│ ├── run # Run container locally
|
|
58
|
-
│ ├── test # Test container or endpoint
|
|
59
|
-
│ ├── clean # Clean up resources
|
|
60
|
-
│ ├── submit # Submit build to CodeBuild
|
|
61
|
-
│ ├── config # Configuration variables
|
|
62
|
-
│ └── README.md # Detailed do-framework documentation
|
|
63
|
-
├── code/ # Model serving code
|
|
64
|
-
│ └── serve # vllm entrypoint script
|
|
65
|
-
├── deploy/ # Legacy scripts (deprecated)
|
|
66
|
-
│ ├── build_and_push.sh # Use ./do/build && ./do/push instead
|
|
67
|
-
│ └── deploy.sh # Use ./do/deploy instead
|
|
68
|
-
|
|
69
|
-
├── test/ # Test suite
|
|
70
|
-
│ ├── test_endpoint.sh # Test SageMaker endpoint
|
|
71
|
-
│ └── test_local_image.sh # Test local container
|
|
72
|
-
|
|
73
|
-
├── Dockerfile # Container definition
|
|
74
|
-
├── requirements.txt # Python dependencies
|
|
75
|
-
└── README.md # This file
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Configuration
|
|
79
|
-
|
|
80
|
-
All deployment configuration is centralized in `do/config`:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
# Project identification
|
|
84
|
-
PROJECT_NAME="sharp-transformer-deployment"
|
|
85
|
-
DEPLOYMENT_CONFIG="transformers-vllm"
|
|
86
|
-
|
|
87
|
-
# AWS configuration
|
|
88
|
-
AWS_REGION="us-west-2"
|
|
89
|
-
INSTANCE_TYPE="ml.g5.xlarge"
|
|
90
|
-
|
|
91
|
-
# Framework configuration
|
|
92
|
-
FRAMEWORK="transformers"
|
|
93
|
-
MODEL_SERVER="vllm"
|
|
94
|
-
|
|
95
|
-
# Model configuration
|
|
96
|
-
MODEL_NAME="openai/gpt-oss-20b"
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
You can override these values by setting environment variables before running do scripts.
|
|
101
|
-
|
|
102
|
-
## Deployment Workflows
|
|
103
|
-
|
|
104
|
-
### Local Development Workflow
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
# Build and test locally
|
|
108
|
-
./do/build
|
|
109
|
-
./do/run &
|
|
110
|
-
./do/test
|
|
111
|
-
|
|
112
|
-
# When satisfied, push to ECR
|
|
113
|
-
./do/push
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### CodeBuild Workflow
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
# Submit build to CodeBuild (builds and pushes to ECR)
|
|
120
|
-
./do/submit
|
|
121
|
-
|
|
122
|
-
# Deploy to SageMaker
|
|
123
|
-
./do/deploy <role-arn>
|
|
124
|
-
|
|
125
|
-
# Test the endpoint
|
|
126
|
-
./do/test sharp-transformer-deployment-endpoint
|
|
127
|
-
```
|
|
7
|
+
## Supported Configurations
|
|
128
8
|
|
|
129
|
-
|
|
9
|
+
| Architecture | Model Servers | Use Case |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| HTTP (traditional ML) | Flask, FastAPI | sklearn, XGBoost, TensorFlow |
|
|
12
|
+
| Transformers (LLMs) | vLLM, SGLang, TensorRT-LLM, DJL/LMI | HuggingFace models, JumpStart, S3 |
|
|
13
|
+
| Triton | FIL, ONNX, Python, TensorRT-LLM, vLLM | Multi-framework serving |
|
|
14
|
+
| Diffusors | vLLM | Image generation models |
|
|
130
15
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
# Delete SageMaker endpoint
|
|
139
|
-
./do/clean endpoint
|
|
140
|
-
|
|
141
|
-
# Clean everything
|
|
142
|
-
./do/clean all
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## do-framework Commands
|
|
146
|
-
|
|
147
|
-
This project uses the [do-framework](https://github.com/iankoulski/do-framework) for standardized container lifecycle management.
|
|
148
|
-
|
|
149
|
-
### Available Commands
|
|
150
|
-
|
|
151
|
-
| Command | Description |
|
|
152
|
-
|---------|-------------|
|
|
153
|
-
| `./do/build` | Build Docker image locally |
|
|
154
|
-
| `./do/push` | Push image to Amazon ECR |
|
|
155
|
-
| `./do/deploy <role-arn>` | Deploy to SageMaker endpoint |
|
|
156
|
-
| `./do/run` | Run container locally on port 8080 |
|
|
157
|
-
| `./do/test [endpoint]` | Test local container or SageMaker endpoint |
|
|
158
|
-
| `./do/clean <target>` | Clean up resources (local/ecr/endpoint/all) |
|
|
159
|
-
| `./do/submit` | Submit build to AWS CodeBuild |
|
|
160
|
-
|
|
161
|
-
For detailed documentation on each command, see `do/README.md`.
|
|
162
|
-
|
|
163
|
-
## Framework-Specific Information
|
|
164
|
-
|
|
165
|
-
### Transformers (vllm)
|
|
166
|
-
|
|
167
|
-
This container serves transformer models using vllm.
|
|
168
|
-
|
|
169
|
-
**Model**: openai/gpt-oss-20b
|
|
170
|
-
|
|
171
|
-
**Server**: vLLM - High-throughput LLM serving with PagedAttention
|
|
172
|
-
|
|
173
|
-
**Features**:
|
|
174
|
-
- Continuous batching
|
|
175
|
-
- Optimized CUDA kernels
|
|
176
|
-
- OpenAI-compatible API
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
**Inference**: Send requests to `/invocations` endpoint with:
|
|
180
|
-
```json
|
|
181
|
-
{
|
|
182
|
-
"inputs": "Your prompt here",
|
|
183
|
-
"parameters": {
|
|
184
|
-
"max_new_tokens": 100,
|
|
185
|
-
"temperature": 0.7
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
## SageMaker Endpoints
|
|
193
|
-
|
|
194
|
-
### Health Check
|
|
195
|
-
|
|
196
|
-
SageMaker calls the `/ping` endpoint to verify container health:
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
curl http://localhost:8080/ping
|
|
200
|
-
```
|
|
16
|
+
| Deployment Target | Description |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Real-Time Inference | SageMaker real-time endpoints |
|
|
19
|
+
| Async Inference | SageMaker async endpoints with S3 output |
|
|
20
|
+
| Batch Transform | SageMaker batch processing |
|
|
21
|
+
| HyperPod EKS | Kubernetes-based deployment |
|
|
201
22
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
### Inference
|
|
205
|
-
|
|
206
|
-
Send prediction requests to the `/invocations` endpoint:
|
|
207
|
-
|
|
208
|
-
```bash
|
|
209
|
-
curl -X POST http://localhost:8080/invocations \
|
|
210
|
-
-H "Content-Type: application/json" \
|
|
211
|
-
-d '{
|
|
212
|
-
"inputs": "What is machine learning?",
|
|
213
|
-
"parameters": {
|
|
214
|
-
"max_new_tokens": 100,
|
|
215
|
-
"temperature": 0.7
|
|
216
|
-
}
|
|
217
|
-
}'
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
## AWS Requirements
|
|
222
|
-
|
|
223
|
-
### IAM Permissions
|
|
224
|
-
|
|
225
|
-
The SageMaker execution role needs these permissions:
|
|
226
|
-
|
|
227
|
-
- `ecr:GetAuthorizationToken`
|
|
228
|
-
- `ecr:BatchCheckLayerAvailability`
|
|
229
|
-
- `ecr:GetDownloadUrlForLayer`
|
|
230
|
-
- `ecr:BatchGetImage`
|
|
231
|
-
- `s3:GetObject` (if using S3 for model artifacts)
|
|
232
|
-
- `logs:CreateLogGroup`
|
|
233
|
-
- `logs:CreateLogStream`
|
|
234
|
-
- `logs:PutLogEvents`
|
|
235
|
-
|
|
236
|
-
See `IAM_PERMISSIONS.md` for detailed permission requirements.
|
|
237
|
-
|
|
238
|
-
### AWS CLI Configuration
|
|
23
|
+
## Quick Start
|
|
239
24
|
|
|
240
|
-
|
|
25
|
+
### Install from npm
|
|
241
26
|
|
|
242
27
|
```bash
|
|
243
|
-
aws
|
|
28
|
+
npm install -g @aws/ml-container-creator
|
|
244
29
|
```
|
|
245
30
|
|
|
246
|
-
Or use
|
|
31
|
+
### Or use without installing (npx)
|
|
247
32
|
|
|
248
33
|
```bash
|
|
249
|
-
|
|
250
|
-
export AWS_SECRET_ACCESS_KEY=your-secret-key
|
|
251
|
-
export AWS_DEFAULT_REGION=us-west-2
|
|
34
|
+
npx @aws/ml-container-creator --help
|
|
252
35
|
```
|
|
253
36
|
|
|
254
|
-
|
|
37
|
+
### Or install from source
|
|
255
38
|
|
|
256
|
-
### Build Issues
|
|
257
|
-
|
|
258
|
-
**Docker Not Found**
|
|
259
|
-
|
|
260
|
-
Install Docker: https://docs.docker.com/get-docker/
|
|
261
|
-
|
|
262
|
-
**Permission Denied**
|
|
263
|
-
|
|
264
|
-
Add your user to the docker group:
|
|
265
39
|
```bash
|
|
266
|
-
|
|
40
|
+
git clone https://github.com/awslabs/ml-container-creator.git
|
|
41
|
+
cd ml-container-creator
|
|
42
|
+
npm install && npm link
|
|
267
43
|
```
|
|
268
44
|
|
|
269
|
-
###
|
|
45
|
+
### Bootstrap AWS infrastructure (one-time)
|
|
270
46
|
|
|
271
|
-
**ECR Push Failed**
|
|
272
|
-
|
|
273
|
-
Check AWS credentials and IAM permissions:
|
|
274
47
|
```bash
|
|
275
|
-
|
|
48
|
+
ml-container-creator bootstrap
|
|
276
49
|
```
|
|
277
50
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
- Verify the execution role ARN is correct
|
|
281
|
-
- Check IAM permissions
|
|
282
|
-
- Ensure the instance type is available in your region
|
|
51
|
+
Sets up an IAM execution role, ECR repository, optional S3 buckets, and optional CI Integration Harness for automated testing. Configuration is saved to `~/.ml-container-creator/config.json`.
|
|
283
52
|
|
|
284
|
-
|
|
53
|
+
### Generate a project
|
|
285
54
|
|
|
286
|
-
Check CloudWatch logs:
|
|
287
55
|
```bash
|
|
288
|
-
|
|
289
|
-
|
|
56
|
+
# Interactive
|
|
57
|
+
ml-container-creator
|
|
290
58
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
59
|
+
# Non-interactive
|
|
60
|
+
ml-container-creator my-model \
|
|
61
|
+
--deployment-config=transformers-vllm \
|
|
62
|
+
--model-name=openai/gpt-oss-20b \
|
|
63
|
+
--instance-type=ml.g6.12xlarge \
|
|
64
|
+
--region=us-east-1 \
|
|
65
|
+
--skip-prompts
|
|
298
66
|
```
|
|
299
67
|
|
|
300
|
-
|
|
68
|
+
### Build, push, deploy
|
|
301
69
|
|
|
302
|
-
Increase instance size or optimize model:
|
|
303
70
|
```bash
|
|
304
|
-
#
|
|
305
|
-
|
|
71
|
+
./do/build # Build Docker image
|
|
72
|
+
./do/push # Push to Amazon ECR
|
|
73
|
+
./do/deploy # Deploy to SageMaker
|
|
74
|
+
./do/test # Test the endpoint
|
|
306
75
|
```
|
|
307
76
|
|
|
308
|
-
##
|
|
309
|
-
|
|
310
|
-
If you're familiar with the old `deploy/` scripts, see `MIGRATION.md` for a command mapping guide.
|
|
311
|
-
|
|
312
|
-
**Quick Reference**:
|
|
313
|
-
|
|
314
|
-
| Legacy Command | do-framework Command |
|
|
315
|
-
|----------------|---------------------|
|
|
316
|
-
| `./deploy/build_and_push.sh` | `./do/build && ./do/push` |
|
|
317
|
-
| `./deploy/deploy.sh <role>` | `./do/deploy <role>` |
|
|
318
|
-
| `./deploy/submit_build.sh` | `./do/submit` |
|
|
77
|
+
## Documentation
|
|
319
78
|
|
|
320
|
-
|
|
79
|
+
Full documentation is available at [awslabs.github.io/ml-container-creator](https://awslabs.github.io/ml-container-creator/).
|
|
321
80
|
|
|
322
|
-
|
|
81
|
+
- [Getting Started](https://awslabs.github.io/ml-container-creator/getting-started/) — Installation and walkthroughs
|
|
82
|
+
- [Configuration](https://awslabs.github.io/ml-container-creator/configuration/) — CLI flags, env vars, config files, MCP servers
|
|
83
|
+
- [Deployment Guide](https://awslabs.github.io/ml-container-creator/deployments/) — All deployment targets and lifecycle scripts
|
|
84
|
+
- [CI Integration](https://awslabs.github.io/ml-container-creator/ci-integration/) — Automated lifecycle testing for all deployment configurations
|
|
85
|
+
- [Examples](https://awslabs.github.io/ml-container-creator/EXAMPLES/) — Framework-specific walkthroughs
|
|
86
|
+
- [Troubleshooting](https://awslabs.github.io/ml-container-creator/TROUBLESHOOTING/) — Common issues and solutions
|
|
323
87
|
|
|
324
|
-
|
|
325
|
-
- [AWS SageMaker Documentation](https://docs.aws.amazon.com/sagemaker/)
|
|
326
|
-
- [SageMaker BYOC Guide](https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html)
|
|
88
|
+
## Prerequisites
|
|
327
89
|
|
|
328
|
-
|
|
90
|
+
| Tool | Version | Purpose |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| [Node.js](https://nodejs.org/) | 24+ | Runs the CLI |
|
|
93
|
+
| [Docker](https://docs.docker.com/get-docker/) | 20+ | Container builds |
|
|
94
|
+
| [AWS CLI](https://aws.amazon.com/cli/) | 2+ | AWS resource management |
|
|
329
95
|
|
|
96
|
+
## Contributing
|
|
330
97
|
|
|
331
|
-
|
|
98
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
332
99
|
|
|
333
|
-
|
|
100
|
+
## Security
|
|
334
101
|
|
|
335
|
-
|
|
336
|
-
2. Review CloudWatch logs for deployment issues
|
|
337
|
-
3. See `MIGRATION.md` if migrating from legacy scripts
|
|
338
|
-
4. Open an issue on the [ML Container Creator repository](https://github.com/yourusername/ml-container-creator)
|
|
102
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md#security-issue-notifications) for reporting security issues.
|
|
339
103
|
|
|
340
104
|
## License
|
|
341
105
|
|
|
342
|
-
|
|
106
|
+
Apache-2.0. See [LICENSE](LICENSE).
|
package/bin/cli.js
CHANGED
|
@@ -101,6 +101,7 @@ program
|
|
|
101
101
|
.addOption(new Option('--discover', 'Enable live registry lookups via MCP discovery'))
|
|
102
102
|
|
|
103
103
|
// --- Validation ---
|
|
104
|
+
.addOption(new Option('--no-validate', 'Skip schema-driven validation at generation time'))
|
|
104
105
|
.addOption(new Option('--validate-env-vars', 'Enable environment variable validation (default: true)'))
|
|
105
106
|
.addOption(new Option('--validate-with-docker', 'Enable Docker introspection validation (opt-in)'))
|
|
106
107
|
.addOption(new Option('--offline', 'Disable HuggingFace API lookups'))
|
|
@@ -179,7 +180,7 @@ program.configureHelp({
|
|
|
179
180
|
groups.features.push(opt);
|
|
180
181
|
} else if (['--smart', '--discover'].includes(long)) {
|
|
181
182
|
groups.mcp.push(opt);
|
|
182
|
-
} else if (['--validate-env-vars', '--validate-with-docker', '--offline'].includes(long)) {
|
|
183
|
+
} else if (['--validate-env-vars', '--validate-with-docker', '--offline', '--no-validate'].includes(long)) {
|
|
183
184
|
groups.validation.push(opt);
|
|
184
185
|
} else {
|
|
185
186
|
groups.general.push(opt);
|
|
@@ -241,7 +242,7 @@ program
|
|
|
241
242
|
.command('bootstrap')
|
|
242
243
|
.description('Set up AWS infrastructure (IAM role, ECR repo, S3 buckets)')
|
|
243
244
|
.passThroughOptions()
|
|
244
|
-
.argument('[action]', 'Bootstrap action (status, use, list, remove, scan, prune, update)')
|
|
245
|
+
.argument('[action]', 'Bootstrap action (status, use, list, remove, scan, prune, update, sync-schemas)')
|
|
245
246
|
.argument('[args...]', 'Additional arguments')
|
|
246
247
|
.option('--profile <profile>', 'AWS profile name')
|
|
247
248
|
.option('--region <region>', 'AWS region')
|
|
@@ -250,6 +251,10 @@ program
|
|
|
250
251
|
.option('--force', 'Force removal without confirmation')
|
|
251
252
|
.option('--verify', 'Verify resources exist (for status)')
|
|
252
253
|
.option('--delete-stack', 'Delete CloudFormation stack on remove')
|
|
254
|
+
.option('--ignore-staleness', 'Suppress schema staleness warnings')
|
|
255
|
+
.option('--ci', 'Provision CI integration infrastructure')
|
|
256
|
+
.option('--skip-ci', 'Skip CI infrastructure provisioning')
|
|
257
|
+
.option('--skip-s3', 'Skip S3 bucket creation')
|
|
253
258
|
.action(async (action, args, options) => {
|
|
254
259
|
const { default: BootstrapCommandHandler } = await import('../src/lib/bootstrap-command-handler.js');
|
|
255
260
|
const handler = new BootstrapCommandHandler();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/ml-container-creator",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Generator for SageMaker AI BYOC paradigm for predictive inference use-cases.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/app.js",
|
|
@@ -19,25 +19,23 @@
|
|
|
19
19
|
"bin/",
|
|
20
20
|
"src/",
|
|
21
21
|
"templates/",
|
|
22
|
-
"servers/
|
|
22
|
+
"servers/lib/catalogs/",
|
|
23
23
|
"servers/base-image-picker/index.js",
|
|
24
24
|
"servers/base-image-picker/manifest.json",
|
|
25
25
|
"servers/base-image-picker/package.json",
|
|
26
|
-
"servers/instance-recommender/catalogs/",
|
|
27
|
-
"servers/instance-recommender/index.js",
|
|
28
|
-
"servers/instance-recommender/manifest.json",
|
|
29
|
-
"servers/instance-recommender/package.json",
|
|
30
|
-
"servers/model-picker/catalogs/",
|
|
31
26
|
"servers/model-picker/index.js",
|
|
32
27
|
"servers/model-picker/manifest.json",
|
|
33
28
|
"servers/model-picker/package.json",
|
|
34
|
-
"servers/region-picker/catalogs/",
|
|
35
29
|
"servers/region-picker/index.js",
|
|
36
30
|
"servers/region-picker/manifest.json",
|
|
37
31
|
"servers/region-picker/package.json",
|
|
38
32
|
"servers/hyperpod-cluster-picker/index.js",
|
|
39
33
|
"servers/hyperpod-cluster-picker/manifest.json",
|
|
40
34
|
"servers/hyperpod-cluster-picker/package.json",
|
|
35
|
+
"servers/instance-sizer/lib/",
|
|
36
|
+
"servers/instance-sizer/index.js",
|
|
37
|
+
"servers/instance-sizer/manifest.json",
|
|
38
|
+
"servers/instance-sizer/package.json",
|
|
41
39
|
"servers/lib/bedrock-client.js",
|
|
42
40
|
"servers/lib/custom-validators.js",
|
|
43
41
|
"servers/lib/dynamic-resolver.js",
|
|
@@ -91,6 +89,7 @@
|
|
|
91
89
|
"dev": "npm link && ml-container-creator",
|
|
92
90
|
"clean": "rm -rf test-output-*",
|
|
93
91
|
"validate": "npm run lint && npm run test:all",
|
|
92
|
+
"validate:catalogs": "node scripts/validate-catalog-enums.js",
|
|
94
93
|
"validate:namespaces": "node scripts/validate-namespaces.js",
|
|
95
94
|
"docs:serve": "mkdocs serve",
|
|
96
95
|
"docs:build": "mkdocs build",
|
|
@@ -104,9 +104,9 @@ let PYTHON_SLIM_CATALOG
|
|
|
104
104
|
let TRITON_IMAGE_CATALOG
|
|
105
105
|
|
|
106
106
|
try {
|
|
107
|
-
TRANSFORMER_IMAGE_CATALOG = loadCatalog('
|
|
108
|
-
PYTHON_SLIM_CATALOG = loadCatalog('
|
|
109
|
-
TRITON_IMAGE_CATALOG = loadCatalog('
|
|
107
|
+
TRANSFORMER_IMAGE_CATALOG = loadCatalog('../lib/catalogs/model-servers.json')
|
|
108
|
+
PYTHON_SLIM_CATALOG = loadCatalog('../lib/catalogs/python-slim.json')
|
|
109
|
+
TRITON_IMAGE_CATALOG = loadCatalog('../lib/catalogs/triton.json')
|
|
110
110
|
} catch (err) {
|
|
111
111
|
process.stderr.write(`[base-image-picker] Fatal: ${err.message}\n`)
|
|
112
112
|
process.exit(1)
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
"discover": true
|
|
9
9
|
},
|
|
10
10
|
"catalogs": {
|
|
11
|
-
"model-servers": "
|
|
12
|
-
"python-slim": "
|
|
11
|
+
"model-servers": "../lib/catalogs/model-servers.json",
|
|
12
|
+
"python-slim": "../lib/catalogs/python-slim.json",
|
|
13
|
+
"triton": "../lib/catalogs/triton.json",
|
|
14
|
+
"triton-backends": "../lib/catalogs/triton-backends.json"
|
|
13
15
|
},
|
|
14
16
|
"tool": {
|
|
15
17
|
"name": "get_base_images"
|