Skip to content

fix(docker): parse ulimits in the documented <type>=<soft>[:<hard>] form - #723

Open
anishmehta24 wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
anishmehta24:fix/docker-ulimit-equals-format
Open

anishmehta24 wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
anishmehta24:fix/docker-ulimit-equals-format

Conversation

@anishmehta24

Copy link
Copy Markdown
Contributor

DockerExecutor.ulimits is documented as <type>=<soft limit>[:<hard limit>], the same form docker run --ulimit takes, but DockerContainer.run only splits on :. So ulimits=["memlock=-1"] raises IndexError when the container is started, and "nofile=1024:2048" is sent to Docker as a ulimit named nofile=1024 with soft and hard set to 2048.

The parser now treats the first = as the separator, so the documented form works. The <type>:<soft>[:<hard>] form used by the existing test parses the same as before.

Added a parametrized test that checks the Ulimit objects passed to containers.run for both forms. The three = cases fail on main and pass with the fix. ruff check and ruff format --check pass.

Signed-off-by: Anish Mehta <mehtaanish111@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Nov 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-request waiting-on-maintainers Waiting on maintainers to respond

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants