From 80af4942d46bb3b23c2cb7da2465169f59d16b97 Mon Sep 17 00:00:00 2001 From: Egor Sklyarov Date: Tue, 1 Aug 2023 16:04:19 +0400 Subject: [PATCH 1/2] Do not require sshd in task configuration for custom docker images --- cli/dstack/_internal/configurators/task.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/cli/dstack/_internal/configurators/task.py b/cli/dstack/_internal/configurators/task.py index 9ae03cab4..cad3d1fc0 100644 --- a/cli/dstack/_internal/configurators/task.py +++ b/cli/dstack/_internal/configurators/task.py @@ -32,9 +32,6 @@ def build_commands(self) -> List[str]: def setup(self) -> List[str]: commands = [] - if self.conf.image: - commands += self.sshd.get_required_commands() - commands += self.sshd.get_setup_commands() commands += self.conf.setup return commands From f9e2b13e0a1fd079a1629b1b81135c49e9441fb7 Mon Sep 17 00:00:00 2001 From: Egor Sklyarov Date: Tue, 1 Aug 2023 16:07:28 +0400 Subject: [PATCH 2/2] Setup sshd for dstack images --- cli/dstack/_internal/configurators/task.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/dstack/_internal/configurators/task.py b/cli/dstack/_internal/configurators/task.py index cad3d1fc0..40a8f1264 100644 --- a/cli/dstack/_internal/configurators/task.py +++ b/cli/dstack/_internal/configurators/task.py @@ -32,6 +32,8 @@ def build_commands(self) -> List[str]: def setup(self) -> List[str]: commands = [] + if self.conf.image is None: + commands += self.sshd.get_setup_commands() commands += self.conf.setup return commands