Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/dstack/_internal/server/services/proxy/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.orm import joinedload

import dstack._internal.server.services.jobs as jobs_services
from dstack._internal.core.consts import DSTACK_RUNNER_SSH_PORT
from dstack._internal.core.models.common import is_core_model_instance
from dstack._internal.core.models.configurations import ServiceConfiguration
Expand Down Expand Up @@ -73,6 +74,10 @@ async def get_service(self, project_name: str, run_name: str) -> Optional[Servic
else:
ssh_destination = "root@localhost" # TODO(#1535): support non-root images properly
ssh_port = DSTACK_RUNNER_SSH_PORT
job_submission = jobs_services.job_model_to_job_submission(job)
jrd = job_submission.job_runtime_data
if jrd is not None and jrd.ports is not None:
ssh_port = jrd.ports.get(ssh_port, ssh_port)
ssh_proxy = SSHConnectionParams(
hostname=jpd.hostname,
username=jpd.username,
Expand Down
Loading