|
25 | 25 | from emd.utils.aws_service_utils import check_cn_region
|
26 | 26 | import questionary
|
27 | 27 | from emd.utils.accelerator_utils import get_gpu_num,check_cuda_exists,check_neuron_exists
|
28 |
| -from emd.utils.decorators import catch_aws_credential_errors,check_emd_env_exist,load_aws_profile |
| 28 | +from emd.utils.decorators import catch_aws_credential_errors,check_emd_env_exist,load_aws_profile,show_update_notification |
| 29 | +from emd.utils.smart_bootstrap import smart_bootstrap_manager |
29 | 30 | from emd.utils.logger_utils import make_layout
|
30 | 31 | from emd.utils.exceptions import ModelNotSupported,ServiceNotSupported,InstanceNotSupported
|
31 | 32 | from prompt_toolkit import prompt
|
@@ -203,6 +204,7 @@ def get_prompt_message():
|
203 | 204 |
|
204 | 205 | #@app.callback(invoke_without_command=True)(invoke_without_command=True)
|
205 | 206 | @app.callback(invoke_without_command=True)
|
| 207 | +@show_update_notification |
206 | 208 | @catch_aws_credential_errors
|
207 | 209 | @check_emd_env_exist
|
208 | 210 | @load_aws_profile
|
@@ -245,13 +247,20 @@ def deploy(
|
245 | 247 | local_gpus:Annotated[
|
246 | 248 | str, typer.Option("--local-gpus", help="Local gpu ids to deploy the model (e.g. `0,1,2`), only working with local deployment mode.")
|
247 | 249 | ] = None,
|
| 250 | + disable_auto_bootstrap: Annotated[ |
| 251 | + Optional[bool], typer.Option("--disable-auto-bootstrap", help="Disable automatic bootstrap when infrastructure version mismatch is detected") |
| 252 | + ] = False, |
248 | 253 | ):
|
249 | 254 | if only_allow_local_deploy:
|
250 | 255 | allow_local_deploy = True
|
251 | 256 | region = LOCAL_REGION
|
252 | 257 | else:
|
253 | 258 | region = get_current_region()
|
254 | 259 |
|
| 260 | + # SMART BOOTSTRAP CHECK - Auto bootstrap if infrastructure version mismatch |
| 261 | + if region != LOCAL_REGION and not disable_auto_bootstrap: # Skip for local deployments or if disabled |
| 262 | + smart_bootstrap_manager.auto_bootstrap_if_needed(region) |
| 263 | + |
255 | 264 | if dockerfile_local_path:
|
256 | 265 | response = sdk_deploy(
|
257 | 266 | model_id='custom-docker',
|
|
0 commit comments