Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
02209bbb
Unverified
Commit
02209bbb
authored
Sep 29, 2025
by
Dillon Cullinan
Committed by
GitHub
Sep 29, 2025
Browse files
ci: Limit cpus in docker processes (#3251)
Signed-off-by:
Dillon Cullinan
<
dcullinan@nvidia.com
>
parent
1208f017
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
.github/actions/docker-build/action.yml
.github/actions/docker-build/action.yml
+4
-1
.github/actions/pytest/action.yml
.github/actions/pytest/action.yml
+6
-0
No files found.
.github/actions/docker-build/action.yml
View file @
02209bbb
...
...
@@ -40,7 +40,10 @@ runs:
using
:
"
composite"
steps
:
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v3
uses
:
docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
#v3.11.1
with
:
# This is not # of CPUs, this is CPU priority, 1024 is the default
driver-opts
:
'
cpu-shares=100'
-
name
:
Login to NGC
if
:
github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
shell
:
bash
...
...
.github/actions/pytest/action.yml
View file @
02209bbb
...
...
@@ -8,6 +8,10 @@ inputs:
image_tag
:
description
:
'
Image
Tag
to
run
tests
on'
required
:
true
cpu_limit
:
description
:
'
Maximum
number
of
cores
available
to
docker'
required
:
false
default
:
'
10'
runs
:
...
...
@@ -16,11 +20,13 @@ runs:
-
name
:
Run tests
shell
:
bash
env
:
NUM_CPUS
:
${{ inputs.cpu_limit }}
CONTAINER_ID
:
test_${{ github.run_id }}_${{ github.run_attempt }}_${{ github.job }}
PYTEST_XML_FILE
:
pytest_test_report.xml
HF_HOME
:
/runner/_work/_temp
run
:
|
docker run --runtime=nvidia --rm --gpus all -w /workspace \
--cpus=${NUM_CPUS} \
--network host \
--name ${{ env.CONTAINER_ID }}_pytest \
${{ inputs.image_tag }} \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment