diff --git a/docs/source/examples/docker-containers.rst b/docs/source/examples/docker-containers.rst index 582db94ee79..408a53a6185 100644 --- a/docs/source/examples/docker-containers.rst +++ b/docs/source/examples/docker-containers.rst @@ -161,6 +161,15 @@ Any GPUs assigned to the task will be automatically mapped to your Docker contai 2. The container image must grant sudo permissions without requiring password authentication for the user. Having a root user is also acceptable. +.. note:: + + Using a container with a customized entrypoint as a runtime environment is + supported, with the container's entrypoint being overridden by :code:`/bin/bash`. + Specific commands can be executed in the :code:`setup` and :code:`run` sections + of the task YAML file. However, this approach is not compatible with RunPod due + to limitations in the RunPod API, so ensure that you choose a container with a + default entrypoint (i.e. :code:`/bin/bash`). + Private Registries ^^^^^^^^^^^^^^^^^^ diff --git a/sky/provision/docker_utils.py b/sky/provision/docker_utils.py index e989fbc085a..7bfa1724b83 100644 --- a/sky/provision/docker_utils.py +++ b/sky/provision/docker_utils.py @@ -110,8 +110,8 @@ def docker_start_cmds( '--cap-add=SYS_ADMIN', '--device=/dev/fuse', '--security-opt=apparmor:unconfined', + '--entrypoint=/bin/bash', image, - 'bash', ] return ' '.join(docker_run) diff --git a/sky/skylet/providers/command_runner.py b/sky/skylet/providers/command_runner.py index 06c5d6d48af..4f66ef54383 100644 --- a/sky/skylet/providers/command_runner.py +++ b/sky/skylet/providers/command_runner.py @@ -65,8 +65,8 @@ def docker_start_cmds( '--cap-add=SYS_ADMIN', '--device=/dev/fuse', '--security-opt=apparmor:unconfined', + '--entrypoint=/bin/bash', image, - 'bash', ] return ' '.join(docker_run)