dayhoff-tools 1.13.6__py3-none-any.whl → 1.13.7__py3-none-any.whl
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.
- dayhoff_tools/cli/engines_studios/engine_commands.py +56 -23
- {dayhoff_tools-1.13.6.dist-info → dayhoff_tools-1.13.7.dist-info}/METADATA +1 -1
- {dayhoff_tools-1.13.6.dist-info → dayhoff_tools-1.13.7.dist-info}/RECORD +5 -5
- {dayhoff_tools-1.13.6.dist-info → dayhoff_tools-1.13.7.dist-info}/WHEEL +0 -0
- {dayhoff_tools-1.13.6.dist-info → dayhoff_tools-1.13.7.dist-info}/entry_points.txt +0 -0
|
@@ -69,11 +69,14 @@ def _update_ssh_config_silent(client: StudioManagerClient, env: str) -> bool:
|
|
|
69
69
|
if state != "running":
|
|
70
70
|
continue
|
|
71
71
|
|
|
72
|
+
# Map environment to AWS profile
|
|
73
|
+
profile = f"{env}-devaccess"
|
|
74
|
+
|
|
72
75
|
config_entries.append(f"\nHost {name}\n")
|
|
73
76
|
config_entries.append(f" HostName {instance_id}\n")
|
|
74
77
|
config_entries.append(f" User {user}\n")
|
|
75
78
|
config_entries.append(
|
|
76
|
-
f" ProxyCommand aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'\n"
|
|
79
|
+
f" ProxyCommand aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p' --profile {profile}\n"
|
|
77
80
|
)
|
|
78
81
|
|
|
79
82
|
config_entries.append(managed_end)
|
|
@@ -213,46 +216,71 @@ def launch_engine(
|
|
|
213
216
|
|
|
214
217
|
except Exception as e:
|
|
215
218
|
error_msg = str(e)
|
|
216
|
-
|
|
219
|
+
|
|
217
220
|
# Check for quota/limit errors
|
|
218
221
|
if "VcpuLimitExceeded" in error_msg or "vCPU limit" in error_msg:
|
|
219
222
|
click.echo(f"✗ Failed to launch engine: vCPU quota exceeded", err=True)
|
|
220
223
|
click.echo("", err=True)
|
|
221
|
-
click.echo(
|
|
224
|
+
click.echo(
|
|
225
|
+
f"The {env} AWS account has insufficient vCPU quota for {engine_type} instances.",
|
|
226
|
+
err=True,
|
|
227
|
+
)
|
|
222
228
|
click.echo("", err=True)
|
|
223
229
|
click.echo("Solutions:", err=True)
|
|
224
|
-
click.echo(
|
|
230
|
+
click.echo(
|
|
231
|
+
" 1. Use a different instance type (e.g., --type cpu)", err=True
|
|
232
|
+
)
|
|
225
233
|
click.echo(" 2. Request a quota increase:", err=True)
|
|
226
234
|
click.echo(" • AWS Console → Service Quotas → Amazon EC2", err=True)
|
|
227
235
|
click.echo(" • Find quota for the instance family", err=True)
|
|
228
|
-
click.echo(
|
|
236
|
+
click.echo(
|
|
237
|
+
" • Request increase (typically approved within 24h)", err=True
|
|
238
|
+
)
|
|
229
239
|
click.echo("", err=True)
|
|
230
|
-
click.echo(
|
|
240
|
+
click.echo(
|
|
241
|
+
"For testing infrastructure, use CPU instances instead of GPU.",
|
|
242
|
+
err=True,
|
|
243
|
+
)
|
|
231
244
|
raise click.Abort()
|
|
232
|
-
|
|
245
|
+
|
|
233
246
|
# Check for insufficient capacity errors
|
|
234
247
|
if "InsufficientInstanceCapacity" in error_msg:
|
|
235
|
-
click.echo(
|
|
248
|
+
click.echo(
|
|
249
|
+
f"✗ Failed to launch engine: insufficient EC2 capacity", err=True
|
|
250
|
+
)
|
|
236
251
|
click.echo("", err=True)
|
|
237
|
-
click.echo(
|
|
252
|
+
click.echo(
|
|
253
|
+
f"AWS does not have available {engine_type} capacity in your region/AZ.",
|
|
254
|
+
err=True,
|
|
255
|
+
)
|
|
238
256
|
click.echo("", err=True)
|
|
239
257
|
click.echo("Solutions:", err=True)
|
|
240
|
-
click.echo(
|
|
258
|
+
click.echo(
|
|
259
|
+
" 1. Try again in a few minutes (capacity fluctuates)", err=True
|
|
260
|
+
)
|
|
241
261
|
click.echo(" 2. Use a different instance type", err=True)
|
|
242
262
|
click.echo(" 3. Contact AWS support for capacity reservations", err=True)
|
|
243
263
|
raise click.Abort()
|
|
244
|
-
|
|
264
|
+
|
|
245
265
|
# Check for instance limit errors
|
|
246
|
-
if
|
|
266
|
+
if (
|
|
267
|
+
"InstanceLimitExceeded" in error_msg
|
|
268
|
+
or "instance limit" in error_msg.lower()
|
|
269
|
+
):
|
|
247
270
|
click.echo(f"✗ Failed to launch engine: instance limit exceeded", err=True)
|
|
248
271
|
click.echo("", err=True)
|
|
249
|
-
click.echo(
|
|
272
|
+
click.echo(
|
|
273
|
+
f"You have reached the maximum number of running instances in {env}.",
|
|
274
|
+
err=True,
|
|
275
|
+
)
|
|
250
276
|
click.echo("", err=True)
|
|
251
277
|
click.echo("Solutions:", err=True)
|
|
252
|
-
click.echo(
|
|
278
|
+
click.echo(
|
|
279
|
+
" 1. Terminate unused engines: dh engine2 list --env {env}", err=True
|
|
280
|
+
)
|
|
253
281
|
click.echo(" 2. Request a limit increase via AWS Service Quotas", err=True)
|
|
254
282
|
raise click.Abort()
|
|
255
|
-
|
|
283
|
+
|
|
256
284
|
# Generic error
|
|
257
285
|
click.echo(f"✗ Failed to launch engine: {e}", err=True)
|
|
258
286
|
raise click.Abort()
|
|
@@ -594,19 +622,24 @@ def engine_status(name_or_id: str, env: Optional[str]):
|
|
|
594
622
|
remaining = readiness["estimated_time_remaining_seconds"]
|
|
595
623
|
click.echo(f"Estimated Time Remaining: {remaining}s")
|
|
596
624
|
|
|
597
|
-
# Show attached studios (always, even without idle state)
|
|
598
|
-
attached_studios = status_data.get("attached_studios", [])
|
|
599
|
-
if attached_studios:
|
|
600
|
-
studio_names = ", ".join([f"\033[35m{s.get('user', 'unknown')}\033[0m" for s in attached_studios])
|
|
601
|
-
click.echo(f"\nAttached Studios: {studio_names}")
|
|
602
|
-
else:
|
|
603
|
-
click.echo(f"\nAttached Studios: None")
|
|
604
|
-
|
|
605
625
|
# Show idle state (only for running engines) - always detailed per user request
|
|
626
|
+
attached_studios = status_data.get("attached_studios", [])
|
|
606
627
|
if status_data.get("idle_state"):
|
|
607
628
|
click.echo(
|
|
608
629
|
f"\n{format_idle_state(status_data['idle_state'], detailed=True, attached_studios=attached_studios)}"
|
|
609
630
|
)
|
|
631
|
+
else:
|
|
632
|
+
# If no idle state yet, still show attached studios
|
|
633
|
+
if attached_studios:
|
|
634
|
+
studio_names = ", ".join(
|
|
635
|
+
[
|
|
636
|
+
f"\033[35m{s.get('user', 'unknown')}\033[0m"
|
|
637
|
+
for s in attached_studios
|
|
638
|
+
]
|
|
639
|
+
)
|
|
640
|
+
click.echo(f"\nAttached Studios: {studio_names}")
|
|
641
|
+
else:
|
|
642
|
+
click.echo(f"\nAttached Studios: None")
|
|
610
643
|
|
|
611
644
|
except Exception as e:
|
|
612
645
|
click.echo(f"✗ Error: {e}", err=True)
|
|
@@ -14,7 +14,7 @@ dayhoff_tools/cli/engines_studios/__init__.py,sha256=E6aG0C6qjJnJuClemSKRFlYvLUL
|
|
|
14
14
|
dayhoff_tools/cli/engines_studios/api_client.py,sha256=McZyyh5H36gkrK6s6Z7s9hl7yLLSLrHjsBtR4Opg6Ko,13491
|
|
15
15
|
dayhoff_tools/cli/engines_studios/auth.py,sha256=rwetV5hp4jSvK8FyvKgXCnezLOZx1aW8oiSDc6U83iE,5189
|
|
16
16
|
dayhoff_tools/cli/engines_studios/engine-studio-cli.md,sha256=or4k7ZZKPMTkvu67PdcUTE2_cxjnj0HQxxTuJZR1uiA,29924
|
|
17
|
-
dayhoff_tools/cli/engines_studios/engine_commands.py,sha256=
|
|
17
|
+
dayhoff_tools/cli/engines_studios/engine_commands.py,sha256=HZKWKgKcSADQ6giW5kq8UwYPY4nCrVofE3PNB0bFPi8,38249
|
|
18
18
|
dayhoff_tools/cli/engines_studios/progress.py,sha256=SMahdG2YmO5bEPSONrfAXVTdS6m_69Ep02t3hc2DdKQ,9264
|
|
19
19
|
dayhoff_tools/cli/engines_studios/simulators/cli-simulators.md,sha256=FZJl6nehdr2Duht2cx3yijcak0yKyOaHTrTzvFTAfZs,4976
|
|
20
20
|
dayhoff_tools/cli/engines_studios/simulators/demo.sh,sha256=8tYABSCxLNXqGs-4r071V9mpKNZ5DTQ34WZ-v3d5s94,5364
|
|
@@ -48,7 +48,7 @@ dayhoff_tools/intake/uniprot.py,sha256=BZYJQF63OtPcBBnQ7_P9gulxzJtqyorgyuDiPeOJq
|
|
|
48
48
|
dayhoff_tools/logs.py,sha256=DKdeP0k0kliRcilwvX0mUB2eipO5BdWUeHwh-VnsICs,838
|
|
49
49
|
dayhoff_tools/sqlite.py,sha256=jV55ikF8VpTfeQqqlHSbY8OgfyfHj8zgHNpZjBLos_E,18672
|
|
50
50
|
dayhoff_tools/warehouse.py,sha256=UETBtZD3r7WgvURqfGbyHlT7cxoiVq8isjzMuerKw8I,24475
|
|
51
|
-
dayhoff_tools-1.13.
|
|
52
|
-
dayhoff_tools-1.13.
|
|
53
|
-
dayhoff_tools-1.13.
|
|
54
|
-
dayhoff_tools-1.13.
|
|
51
|
+
dayhoff_tools-1.13.7.dist-info/METADATA,sha256=ylXgCRVZUklhlePHVBhWKq50uBdex_XfCTG4hXx8g7A,2980
|
|
52
|
+
dayhoff_tools-1.13.7.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
53
|
+
dayhoff_tools-1.13.7.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
|
|
54
|
+
dayhoff_tools-1.13.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|