@aws/ml-container-creator 0.2.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.
- package/LICENSE +202 -0
- package/LICENSE-THIRD-PARTY +68620 -0
- package/NOTICE +2 -0
- package/README.md +106 -0
- package/bin/cli.js +365 -0
- package/config/defaults.json +32 -0
- package/config/presets/transformers-djl.json +26 -0
- package/config/presets/transformers-gpu.json +24 -0
- package/config/presets/transformers-lmi.json +27 -0
- package/package.json +129 -0
- package/servers/README.md +419 -0
- package/servers/base-image-picker/catalogs/model-servers.json +1191 -0
- package/servers/base-image-picker/catalogs/python-slim.json +38 -0
- package/servers/base-image-picker/catalogs/triton-backends.json +51 -0
- package/servers/base-image-picker/catalogs/triton.json +38 -0
- package/servers/base-image-picker/index.js +495 -0
- package/servers/base-image-picker/manifest.json +17 -0
- package/servers/base-image-picker/package.json +15 -0
- package/servers/hyperpod-cluster-picker/LICENSE +202 -0
- package/servers/hyperpod-cluster-picker/index.js +424 -0
- package/servers/hyperpod-cluster-picker/manifest.json +14 -0
- package/servers/hyperpod-cluster-picker/package.json +17 -0
- package/servers/instance-recommender/LICENSE +202 -0
- package/servers/instance-recommender/catalogs/instances.json +852 -0
- package/servers/instance-recommender/index.js +284 -0
- package/servers/instance-recommender/manifest.json +16 -0
- package/servers/instance-recommender/package.json +15 -0
- package/servers/lib/LICENSE +202 -0
- package/servers/lib/bedrock-client.js +160 -0
- package/servers/lib/custom-validators.js +46 -0
- package/servers/lib/dynamic-resolver.js +36 -0
- package/servers/lib/package.json +11 -0
- package/servers/lib/schemas/image-catalog.schema.json +185 -0
- package/servers/lib/schemas/instances.schema.json +124 -0
- package/servers/lib/schemas/manifest.schema.json +64 -0
- package/servers/lib/schemas/model-catalog.schema.json +91 -0
- package/servers/lib/schemas/regions.schema.json +26 -0
- package/servers/lib/schemas/triton-backends.schema.json +51 -0
- package/servers/model-picker/catalogs/jumpstart-public.json +66 -0
- package/servers/model-picker/catalogs/popular-diffusors.json +88 -0
- package/servers/model-picker/catalogs/popular-transformers.json +226 -0
- package/servers/model-picker/index.js +1693 -0
- package/servers/model-picker/manifest.json +18 -0
- package/servers/model-picker/package.json +20 -0
- package/servers/region-picker/LICENSE +202 -0
- package/servers/region-picker/catalogs/regions.json +263 -0
- package/servers/region-picker/index.js +230 -0
- package/servers/region-picker/manifest.json +16 -0
- package/servers/region-picker/package.json +15 -0
- package/src/app.js +1007 -0
- package/src/copy-tpl.js +77 -0
- package/src/lib/accelerator-validator.js +39 -0
- package/src/lib/asset-manager.js +385 -0
- package/src/lib/aws-profile-parser.js +181 -0
- package/src/lib/bootstrap-command-handler.js +1647 -0
- package/src/lib/bootstrap-config.js +238 -0
- package/src/lib/ci-register-helpers.js +124 -0
- package/src/lib/ci-report-helpers.js +158 -0
- package/src/lib/ci-stage-helpers.js +268 -0
- package/src/lib/cli-handler.js +529 -0
- package/src/lib/comment-generator.js +544 -0
- package/src/lib/community-reports-validator.js +91 -0
- package/src/lib/config-manager.js +2106 -0
- package/src/lib/configuration-exporter.js +204 -0
- package/src/lib/configuration-manager.js +695 -0
- package/src/lib/configuration-matcher.js +221 -0
- package/src/lib/cpu-validator.js +36 -0
- package/src/lib/cuda-validator.js +57 -0
- package/src/lib/deployment-config-resolver.js +103 -0
- package/src/lib/deployment-entry-schema.js +125 -0
- package/src/lib/deployment-registry.js +598 -0
- package/src/lib/docker-introspection-validator.js +51 -0
- package/src/lib/engine-prefix-resolver.js +60 -0
- package/src/lib/huggingface-client.js +172 -0
- package/src/lib/key-value-parser.js +37 -0
- package/src/lib/known-flags-validator.js +200 -0
- package/src/lib/manifest-cli.js +280 -0
- package/src/lib/mcp-client.js +303 -0
- package/src/lib/mcp-command-handler.js +532 -0
- package/src/lib/neuron-validator.js +80 -0
- package/src/lib/parameter-schema-validator.js +284 -0
- package/src/lib/prompt-runner.js +1349 -0
- package/src/lib/prompts.js +1138 -0
- package/src/lib/registry-command-handler.js +519 -0
- package/src/lib/registry-loader.js +198 -0
- package/src/lib/rocm-validator.js +80 -0
- package/src/lib/schema-validator.js +157 -0
- package/src/lib/sensitive-redactor.js +59 -0
- package/src/lib/template-engine.js +156 -0
- package/src/lib/template-manager.js +341 -0
- package/src/lib/validation-engine.js +314 -0
- package/src/prompt-adapter.js +63 -0
- package/templates/Dockerfile +300 -0
- package/templates/IAM_PERMISSIONS.md +84 -0
- package/templates/MIGRATION.md +488 -0
- package/templates/PROJECT_README.md +439 -0
- package/templates/TEMPLATE_SYSTEM.md +243 -0
- package/templates/buildspec.yml +64 -0
- package/templates/code/chat_template.jinja +1 -0
- package/templates/code/flask/gunicorn_config.py +35 -0
- package/templates/code/flask/wsgi.py +10 -0
- package/templates/code/model_handler.py +387 -0
- package/templates/code/serve +300 -0
- package/templates/code/serve.py +175 -0
- package/templates/code/serving.properties +105 -0
- package/templates/code/start_server.py +39 -0
- package/templates/code/start_server.sh +39 -0
- package/templates/diffusors/Dockerfile +72 -0
- package/templates/diffusors/patch_image_api.py +35 -0
- package/templates/diffusors/serve +115 -0
- package/templates/diffusors/start_server.sh +114 -0
- package/templates/do/.gitkeep +1 -0
- package/templates/do/README.md +541 -0
- package/templates/do/build +83 -0
- package/templates/do/ci +681 -0
- package/templates/do/clean +811 -0
- package/templates/do/config +260 -0
- package/templates/do/deploy +1560 -0
- package/templates/do/export +306 -0
- package/templates/do/logs +319 -0
- package/templates/do/manifest +12 -0
- package/templates/do/push +119 -0
- package/templates/do/register +580 -0
- package/templates/do/run +113 -0
- package/templates/do/submit +417 -0
- package/templates/do/test +1147 -0
- package/templates/hyperpod/configmap.yaml +24 -0
- package/templates/hyperpod/deployment.yaml +71 -0
- package/templates/hyperpod/pvc.yaml +42 -0
- package/templates/hyperpod/service.yaml +17 -0
- package/templates/nginx-diffusors.conf +74 -0
- package/templates/nginx-predictors.conf +47 -0
- package/templates/nginx-tensorrt.conf +74 -0
- package/templates/requirements.txt +61 -0
- package/templates/sample_model/test_inference.py +123 -0
- package/templates/sample_model/train_abalone.py +252 -0
- package/templates/test/test_endpoint.sh +79 -0
- package/templates/test/test_local_image.sh +80 -0
- package/templates/test/test_model_handler.py +180 -0
- package/templates/triton/Dockerfile +128 -0
- package/templates/triton/config.pbtxt +163 -0
- package/templates/triton/model.py +130 -0
- package/templates/triton/requirements.txt +11 -0
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
# Migration Guide: Legacy Scripts to do-framework
|
|
2
|
+
|
|
3
|
+
This guide helps you transition from the legacy `deploy/` scripts to the new do-framework commands.
|
|
4
|
+
|
|
5
|
+
## Why Migrate?
|
|
6
|
+
|
|
7
|
+
The do-framework provides:
|
|
8
|
+
|
|
9
|
+
- **Standardization**: Consistent interface across all ML Container Creator projects
|
|
10
|
+
- **Better Organization**: Clear separation of concerns with dedicated scripts
|
|
11
|
+
- **Enhanced Features**: More granular control over build, push, deploy, test, and cleanup
|
|
12
|
+
- **Community Standard**: Follows the widely-adopted do-framework conventions
|
|
13
|
+
- **Improved Maintainability**: Centralized configuration in `do/config`
|
|
14
|
+
|
|
15
|
+
## Quick Reference
|
|
16
|
+
|
|
17
|
+
| Legacy Command | do-framework Command | Notes |
|
|
18
|
+
|----------------|---------------------|-------|
|
|
19
|
+
| `./deploy/build_and_push.sh` | `./do/build && ./do/push` | Now split into two commands |
|
|
20
|
+
| `./deploy/deploy.sh <role>` | `./do/deploy <role>` | Same functionality |
|
|
21
|
+
<% if (buildTarget === 'codebuild') { %>| `./deploy/submit_build.sh` | `./do/submit` | CodeBuild integration |
|
|
22
|
+
<% } %>| N/A | `./do/run` | New: Run container locally |
|
|
23
|
+
| N/A | `./do/test [endpoint]` | New: Test container or endpoint |
|
|
24
|
+
| N/A | `./do/clean <target>` | New: Clean up resources |
|
|
25
|
+
|
|
26
|
+
## Detailed Migration Steps
|
|
27
|
+
|
|
28
|
+
### Step 1: Understand the New Structure
|
|
29
|
+
|
|
30
|
+
The do-framework organizes scripts in the `do/` directory:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
do/
|
|
34
|
+
├── config # Centralized configuration
|
|
35
|
+
├── build # Build Docker image
|
|
36
|
+
├── push # Push to ECR
|
|
37
|
+
├── deploy # Deploy to SageMaker
|
|
38
|
+
├── run # Run locally
|
|
39
|
+
├── test # Test container/endpoint
|
|
40
|
+
├── clean # Clean up resources
|
|
41
|
+
<% if (buildTarget === 'codebuild') { %>├── submit # Submit to CodeBuild
|
|
42
|
+
<% } %>└── README.md # Detailed documentation
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Step 2: Update Your Workflow
|
|
46
|
+
|
|
47
|
+
#### Old Workflow
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Build and push
|
|
51
|
+
./deploy/build_and_push.sh
|
|
52
|
+
|
|
53
|
+
# Deploy
|
|
54
|
+
./deploy/deploy.sh arn:aws:iam::123456789012:role/SageMakerRole
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### New Workflow
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Build
|
|
61
|
+
./do/build
|
|
62
|
+
|
|
63
|
+
# Test locally (optional but recommended)
|
|
64
|
+
./do/run &
|
|
65
|
+
./do/test
|
|
66
|
+
|
|
67
|
+
# Push to ECR
|
|
68
|
+
./do/push
|
|
69
|
+
|
|
70
|
+
# Deploy to SageMaker
|
|
71
|
+
./do/deploy arn:aws:iam::123456789012:role/SageMakerRole
|
|
72
|
+
|
|
73
|
+
# Test the endpoint
|
|
74
|
+
./do/test <%= projectName %>-endpoint
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
<% if (buildTarget === 'codebuild') { %>#### CodeBuild Workflow
|
|
78
|
+
|
|
79
|
+
**Old**:
|
|
80
|
+
```bash
|
|
81
|
+
./deploy/submit_build.sh
|
|
82
|
+
./deploy/deploy.sh <role-arn>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**New**:
|
|
86
|
+
```bash
|
|
87
|
+
./do/submit # Builds and pushes via CodeBuild
|
|
88
|
+
./do/deploy <role-arn>
|
|
89
|
+
./do/test <%= projectName %>-endpoint
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
<% } %>### Step 3: Update Configuration
|
|
93
|
+
|
|
94
|
+
#### Old: Hardcoded in Scripts
|
|
95
|
+
|
|
96
|
+
Legacy scripts had configuration hardcoded or passed as arguments.
|
|
97
|
+
|
|
98
|
+
#### New: Centralized in do/config
|
|
99
|
+
|
|
100
|
+
All configuration is now in `do/config`:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Edit do/config
|
|
104
|
+
export PROJECT_NAME="<%= projectName %>"
|
|
105
|
+
export AWS_REGION="<%= awsRegion %>"
|
|
106
|
+
export INSTANCE_TYPE="<%= instanceType %>"
|
|
107
|
+
export DEPLOYMENT_CONFIG="<%= deploymentConfig %>"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
You can override these with environment variables:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
AWS_REGION=us-west-2 ./do/push
|
|
114
|
+
INSTANCE_TYPE=ml.m5.2xlarge ./do/deploy <role-arn>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Step 4: Update CI/CD Pipelines
|
|
118
|
+
|
|
119
|
+
#### Old Pipeline
|
|
120
|
+
|
|
121
|
+
```yaml
|
|
122
|
+
# .github/workflows/deploy.yml
|
|
123
|
+
- name: Build and Push
|
|
124
|
+
run: ./deploy/build_and_push.sh
|
|
125
|
+
|
|
126
|
+
- name: Deploy
|
|
127
|
+
run: ./deploy/deploy.sh ${{ secrets.SAGEMAKER_ROLE }}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
#### New Pipeline
|
|
131
|
+
|
|
132
|
+
```yaml
|
|
133
|
+
# .github/workflows/deploy.yml
|
|
134
|
+
- name: Build
|
|
135
|
+
run: ./do/build
|
|
136
|
+
|
|
137
|
+
- name: Push
|
|
138
|
+
run: ./do/push
|
|
139
|
+
|
|
140
|
+
- name: Deploy
|
|
141
|
+
run: ./do/deploy ${{ secrets.SAGEMAKER_ROLE }}
|
|
142
|
+
|
|
143
|
+
- name: Test
|
|
144
|
+
run: ./do/test <%= projectName %>-endpoint
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Step 5: Update Documentation
|
|
148
|
+
|
|
149
|
+
Update any project documentation that references the old scripts:
|
|
150
|
+
|
|
151
|
+
**Find and replace**:
|
|
152
|
+
- `./deploy/build_and_push.sh` → `./do/build && ./do/push`
|
|
153
|
+
- `./deploy/deploy.sh` → `./do/deploy`
|
|
154
|
+
<% if (buildTarget === 'codebuild') { %>- `./deploy/submit_build.sh` → `./do/submit`
|
|
155
|
+
<% } %>
|
|
156
|
+
## Command Mapping Details
|
|
157
|
+
|
|
158
|
+
### Build and Push
|
|
159
|
+
|
|
160
|
+
**Legacy**:
|
|
161
|
+
```bash
|
|
162
|
+
./deploy/build_and_push.sh
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
This single script built the Docker image and pushed it to ECR.
|
|
166
|
+
|
|
167
|
+
**do-framework**:
|
|
168
|
+
```bash
|
|
169
|
+
./do/build # Build Docker image
|
|
170
|
+
./do/push # Push to ECR
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Why the change?** Separating build and push allows you to:
|
|
174
|
+
- Test the image locally before pushing
|
|
175
|
+
- Build once and push to multiple registries
|
|
176
|
+
- Skip pushing if you only need local testing
|
|
177
|
+
|
|
178
|
+
**Benefits**:
|
|
179
|
+
- Test locally with `./do/run` before pushing
|
|
180
|
+
- More granular control over the workflow
|
|
181
|
+
- Clearer error messages for each step
|
|
182
|
+
|
|
183
|
+
### Deploy
|
|
184
|
+
|
|
185
|
+
**Legacy**:
|
|
186
|
+
```bash
|
|
187
|
+
./deploy/deploy.sh arn:aws:iam::123456789012:role/SageMakerRole
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**do-framework**:
|
|
191
|
+
```bash
|
|
192
|
+
./do/deploy arn:aws:iam::123456789012:role/SageMakerRole
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**What's the same?**
|
|
196
|
+
- Same command-line interface
|
|
197
|
+
- Same functionality
|
|
198
|
+
- Same SageMaker endpoint creation
|
|
199
|
+
|
|
200
|
+
**What's different?**
|
|
201
|
+
- Better error messages
|
|
202
|
+
- Progress indicators
|
|
203
|
+
- Automatic endpoint status polling
|
|
204
|
+
- Displays test command when complete
|
|
205
|
+
|
|
206
|
+
<% if (buildTarget === 'codebuild') { %>### CodeBuild Submit
|
|
207
|
+
|
|
208
|
+
**Legacy**:
|
|
209
|
+
```bash
|
|
210
|
+
./deploy/submit_build.sh
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**do-framework**:
|
|
214
|
+
```bash
|
|
215
|
+
./do/submit
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**What's improved?**
|
|
219
|
+
- Better build progress monitoring
|
|
220
|
+
- Clearer error messages
|
|
221
|
+
- Automatic ECR image URI display
|
|
222
|
+
- Build log streaming
|
|
223
|
+
|
|
224
|
+
<% } %>### New Commands
|
|
225
|
+
|
|
226
|
+
The do-framework adds several new commands that weren't available with legacy scripts:
|
|
227
|
+
|
|
228
|
+
#### Run Locally
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
./do/run
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Starts the container locally on port 8080 for testing before deployment.
|
|
235
|
+
|
|
236
|
+
**Use cases**:
|
|
237
|
+
- Test model loading
|
|
238
|
+
- Verify inference logic
|
|
239
|
+
- Debug issues locally
|
|
240
|
+
- Validate container configuration
|
|
241
|
+
|
|
242
|
+
#### Test
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Test local container
|
|
246
|
+
./do/test
|
|
247
|
+
|
|
248
|
+
# Test SageMaker endpoint
|
|
249
|
+
./do/test <%= projectName %>-endpoint
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Sends health check and inference requests to validate functionality.
|
|
253
|
+
|
|
254
|
+
**Use cases**:
|
|
255
|
+
- Verify endpoints are working
|
|
256
|
+
- Validate inference responses
|
|
257
|
+
- Automated testing in CI/CD
|
|
258
|
+
- Quick smoke tests
|
|
259
|
+
|
|
260
|
+
#### Clean
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# Remove local images
|
|
264
|
+
./do/clean local
|
|
265
|
+
|
|
266
|
+
# Remove ECR images
|
|
267
|
+
./do/clean ecr
|
|
268
|
+
|
|
269
|
+
# Delete SageMaker endpoint
|
|
270
|
+
./do/clean endpoint
|
|
271
|
+
|
|
272
|
+
# Clean everything
|
|
273
|
+
./do/clean all
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Manages cleanup of resources across different environments.
|
|
277
|
+
|
|
278
|
+
**Use cases**:
|
|
279
|
+
- Free up disk space
|
|
280
|
+
- Remove old ECR images
|
|
281
|
+
- Delete test endpoints
|
|
282
|
+
- Complete project cleanup
|
|
283
|
+
|
|
284
|
+
## Configuration Changes
|
|
285
|
+
|
|
286
|
+
### Legacy Configuration
|
|
287
|
+
|
|
288
|
+
Configuration was scattered across multiple scripts:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
# In deploy/build_and_push.sh
|
|
292
|
+
PROJECT_NAME="my-model"
|
|
293
|
+
REGION="us-east-1"
|
|
294
|
+
|
|
295
|
+
# In deploy/deploy.sh
|
|
296
|
+
INSTANCE_TYPE="ml.m5.xlarge"
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### do-framework Configuration
|
|
300
|
+
|
|
301
|
+
All configuration is centralized in `do/config`:
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
# do/config
|
|
305
|
+
export PROJECT_NAME="<%= projectName %>"
|
|
306
|
+
export DEPLOYMENT_CONFIG="<%= deploymentConfig %>"
|
|
307
|
+
export FRAMEWORK="<%= framework %>"
|
|
308
|
+
export MODEL_SERVER="<%= modelServer %>"
|
|
309
|
+
export AWS_REGION="<%= awsRegion %>"
|
|
310
|
+
export INSTANCE_TYPE="<%= instanceType %>"
|
|
311
|
+
export ECR_REPOSITORY_NAME="ml-container-creator"
|
|
312
|
+
<% if (buildTarget === 'codebuild') { %>export BUILD_TARGET="codebuild"
|
|
313
|
+
export CODEBUILD_COMPUTE_TYPE="<%= codebuildComputeType %>"
|
|
314
|
+
<% } %><% if (framework === 'transformers') { %>export MODEL_NAME="<%= modelName %>"
|
|
315
|
+
<% if (hfToken) { %>export HF_TOKEN="<%= hfToken %>"
|
|
316
|
+
<% } %><% } %>
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Benefits**:
|
|
320
|
+
- Single source of truth
|
|
321
|
+
- Easy to override with environment variables
|
|
322
|
+
- Clear documentation of all settings
|
|
323
|
+
- Consistent across all scripts
|
|
324
|
+
|
|
325
|
+
## Backward Compatibility
|
|
326
|
+
|
|
327
|
+
The legacy scripts are still available in the `deploy/` directory for backward compatibility:
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
./deploy/build_and_push.sh # Still works
|
|
331
|
+
./deploy/deploy.sh # Still works
|
|
332
|
+
<% if (buildTarget === 'codebuild') { %>./deploy/submit_build.sh # Still works
|
|
333
|
+
<% } %>
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**However**:
|
|
337
|
+
- They display deprecation warnings
|
|
338
|
+
- They forward to do-framework commands
|
|
339
|
+
- They will be removed in a future version
|
|
340
|
+
|
|
341
|
+
**Deprecation timeline**:
|
|
342
|
+
- Current version: Legacy scripts work with warnings
|
|
343
|
+
- Next major version: Legacy scripts may be removed
|
|
344
|
+
- Recommendation: Migrate now to avoid future issues
|
|
345
|
+
|
|
346
|
+
## Troubleshooting Migration
|
|
347
|
+
|
|
348
|
+
### Issue: "Command not found"
|
|
349
|
+
|
|
350
|
+
**Problem**: `./do/build: command not found`
|
|
351
|
+
|
|
352
|
+
**Solution**: Ensure scripts are executable:
|
|
353
|
+
```bash
|
|
354
|
+
chmod +x do/*
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
The generator should set this automatically, but if you copied files manually, you may need to set permissions.
|
|
358
|
+
|
|
359
|
+
### Issue: "Configuration variable not set"
|
|
360
|
+
|
|
361
|
+
**Problem**: `PROJECT_NAME not set in do/config`
|
|
362
|
+
|
|
363
|
+
**Solution**: Ensure `do/config` is properly sourced:
|
|
364
|
+
```bash
|
|
365
|
+
# Check if config exists
|
|
366
|
+
cat do/config
|
|
367
|
+
|
|
368
|
+
# Manually source to test
|
|
369
|
+
source do/config
|
|
370
|
+
echo $PROJECT_NAME
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### Issue: "AWS credentials not configured"
|
|
374
|
+
|
|
375
|
+
**Problem**: `AWS credentials not configured`
|
|
376
|
+
|
|
377
|
+
**Solution**: Configure AWS CLI:
|
|
378
|
+
```bash
|
|
379
|
+
aws configure
|
|
380
|
+
# Or set environment variables
|
|
381
|
+
export AWS_ACCESS_KEY_ID=your-key
|
|
382
|
+
export AWS_SECRET_ACCESS_KEY=your-secret
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Issue: "Docker permission denied"
|
|
386
|
+
|
|
387
|
+
**Problem**: `permission denied while trying to connect to the Docker daemon`
|
|
388
|
+
|
|
389
|
+
**Solution**: Add user to docker group:
|
|
390
|
+
```bash
|
|
391
|
+
sudo usermod -aG docker $USER
|
|
392
|
+
# Log out and back in for changes to take effect
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Issue: Legacy scripts not working
|
|
396
|
+
|
|
397
|
+
**Problem**: Legacy scripts fail after migration
|
|
398
|
+
|
|
399
|
+
**Solution**:
|
|
400
|
+
1. Check that do-framework scripts work: `./do/build`
|
|
401
|
+
2. Verify do/config exists and is valid
|
|
402
|
+
3. Check script permissions: `ls -la do/`
|
|
403
|
+
4. Review deprecation warnings for guidance
|
|
404
|
+
|
|
405
|
+
## FAQ
|
|
406
|
+
|
|
407
|
+
### Q: Do I have to migrate immediately?
|
|
408
|
+
|
|
409
|
+
**A**: No, legacy scripts still work. However, we recommend migrating to benefit from new features and avoid future compatibility issues.
|
|
410
|
+
|
|
411
|
+
### Q: Can I use both legacy and do-framework commands?
|
|
412
|
+
|
|
413
|
+
**A**: Yes, but it's not recommended. Choose one approach for consistency.
|
|
414
|
+
|
|
415
|
+
### Q: Will my existing CI/CD pipelines break?
|
|
416
|
+
|
|
417
|
+
**A**: No, legacy scripts still work. But you should update pipelines to use do-framework commands for better features and future compatibility.
|
|
418
|
+
|
|
419
|
+
### Q: What if I have custom modifications to legacy scripts?
|
|
420
|
+
|
|
421
|
+
**A**: Review your modifications and apply them to the appropriate do-framework scripts. The modular structure makes customization easier.
|
|
422
|
+
|
|
423
|
+
### Q: Can I customize do-framework scripts?
|
|
424
|
+
|
|
425
|
+
**A**: Yes! The scripts are designed to be customizable. Edit them as needed for your use case.
|
|
426
|
+
|
|
427
|
+
### Q: Where can I find detailed documentation?
|
|
428
|
+
|
|
429
|
+
**A**: See `do/README.md` for comprehensive documentation of all do-framework commands.
|
|
430
|
+
|
|
431
|
+
### Q: What if I encounter issues during migration?
|
|
432
|
+
|
|
433
|
+
**A**:
|
|
434
|
+
1. Check this migration guide
|
|
435
|
+
2. Review `do/README.md`
|
|
436
|
+
3. Check CloudWatch logs for deployment issues
|
|
437
|
+
4. Open an issue on the ML Container Creator repository
|
|
438
|
+
|
|
439
|
+
## Benefits Summary
|
|
440
|
+
|
|
441
|
+
### For Developers
|
|
442
|
+
|
|
443
|
+
- **Clearer workflow**: Separate commands for each step
|
|
444
|
+
- **Better testing**: Test locally before deploying
|
|
445
|
+
- **Easier debugging**: Granular control over each phase
|
|
446
|
+
- **Consistent interface**: Same commands across all projects
|
|
447
|
+
|
|
448
|
+
### For Teams
|
|
449
|
+
|
|
450
|
+
- **Standardization**: Everyone uses the same commands
|
|
451
|
+
- **Better documentation**: Clear, comprehensive guides
|
|
452
|
+
- **Easier onboarding**: New team members learn one system
|
|
453
|
+
- **Community alignment**: Follows do-framework conventions
|
|
454
|
+
|
|
455
|
+
### For CI/CD
|
|
456
|
+
|
|
457
|
+
- **More control**: Fine-grained pipeline steps
|
|
458
|
+
- **Better error handling**: Clear failure points
|
|
459
|
+
- **Easier testing**: Test at each stage
|
|
460
|
+
- **Improved monitoring**: Track each step separately
|
|
461
|
+
|
|
462
|
+
## Next Steps
|
|
463
|
+
|
|
464
|
+
1. **Read** `do/README.md` for detailed command documentation
|
|
465
|
+
2. **Test** the new commands in a development environment
|
|
466
|
+
3. **Update** your CI/CD pipelines
|
|
467
|
+
4. **Update** your team documentation
|
|
468
|
+
5. **Remove** references to legacy scripts from your workflows
|
|
469
|
+
|
|
470
|
+
## Additional Resources
|
|
471
|
+
|
|
472
|
+
- [do-framework Documentation](https://github.com/iankoulski/do-framework)
|
|
473
|
+
- [ML Container Creator Documentation](https://github.com/yourusername/ml-container-creator)
|
|
474
|
+
- [AWS SageMaker BYOC Guide](https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html)
|
|
475
|
+
|
|
476
|
+
## Feedback
|
|
477
|
+
|
|
478
|
+
We'd love to hear about your migration experience! If you encounter issues or have suggestions, please:
|
|
479
|
+
|
|
480
|
+
1. Open an issue on the ML Container Creator repository
|
|
481
|
+
2. Share your feedback with the team
|
|
482
|
+
3. Contribute improvements to this guide
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
**Last Updated**: <%= buildTimestamp %>
|
|
487
|
+
|
|
488
|
+
**Generated by**: ML Container Creator v2.0 (do-framework integration)
|