Skip to content

Commit

Permalink
feat: Allow self-ssh in single-node single-container compute sessions (
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Apr 18, 2024
1 parent 0176e13 commit 5d69e72
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions changes/2032.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow self-ssh in single-node single-container compute sessions.
2 changes: 1 addition & 1 deletion src/ai/backend/common/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ class ClusterInfo(TypedDict):
size: int
replicas: Mapping[str, int] # per-role kernel counts
network_name: Optional[str]
ssh_keypair: Optional[ClusterSSHKeyPair]
ssh_keypair: ClusterSSHKeyPair
cluster_ssh_port_mapping: Optional[ClusterSSHPortMapping]


Expand Down
6 changes: 1 addition & 5 deletions src/ai/backend/manager/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,11 +1444,7 @@ async def start_session(
size=scheduled_session.cluster_size,
replicas=replicas,
network_name=network_name,
ssh_keypair=(
await self.create_cluster_ssh_keypair()
if scheduled_session.cluster_size > 1
else None
),
ssh_keypair=await self.create_cluster_ssh_keypair(),
cluster_ssh_port_mapping=cast(
Optional[ClusterSSHPortMapping], cluster_ssh_port_mapping
),
Expand Down

0 comments on commit 5d69e72

Please sign in to comment.