Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Core] Enable use docker image w/ non-default entrypoint as runtime env #3867

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
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
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
Loading