Skip to content

Commit

Permalink
[Core] Enable use docker image w/ non-default entrypoint as runtime e…
Browse files Browse the repository at this point in the history
…nv (#3867)

* fix

* fix in cmd runner as well

* add comment in docs

* revert unwanted changes

* add runpod explanation
  • Loading branch information
cblmemo authored Aug 27, 2024
1 parent 6067e2b commit c25d6ea
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions docs/source/examples/docker-containers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
^^^^^^^^^^^^^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion sky/provision/docker_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion sky/skylet/providers/command_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit c25d6ea

Please sign in to comment.