Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit d28b846

Browse files
leshikusalexbaden
authored andcommitted
Add ASAN runner
1 parent b8ff1ce commit d28b846

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
name: conda
109109
build-name: asan
110110
reset-cache: ${{ !!inputs.reset-cache }}
111+
runner: asan
111112

112113
build-cuda-docker:
113114
name: Build

.github/workflows/test-docker.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,29 @@ jobs:
4848
with:
4949
name: ${{ runner.os }}-asan-cache
5050

51-
- name: Unpack build files, create Dockerfile
51+
- name: Unpack build files, create Dockerfile, build and start the container
5252
run: |
5353
tar -zxf build.tgz
54+
set -vx
5455
cat docker/Dockerfile docker/Dockerfile.${{ inputs.name }} >Dockerfile
5556
56-
- name: Start the container
57-
if: inputs.name != 'l0'
58-
run: |
59-
set -vx
60-
docker build . ${{ inputs.reset-cache && '--no-cache ' || '' }}--tag hdk-build.${{ inputs.name }}
61-
docker run -id --name hdk-build.${{ inputs.name }} --network host --device /dev/nvidia-modeset:/dev/nvidia-modeset --device /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools --device /dev/nvidia-uvm:/dev/nvidia-uvm --device /dev/nvidia0:/dev/nvidia0 --device /dev/nvidiactl:/dev/nvidiactl hdk-build.${{ inputs.name }}:latest
57+
devices=$(find /dev -type c -name 'nvidia*' | awk '{ print " --device "$1":"$1 }')
58+
test ! -d /dev/dri || {
59+
ls -l /dev/dri
60+
devices="$devices --device /dev/dri:/dev/dri"
61+
getent group render | awk -F : '{ print "RUN groupadd -g "$3" render && usermod -a -G render ghrunner" }' >>Dockerfile
62+
}
6263
63-
- name: Start L0 container
64-
if: inputs.name == 'l0'
65-
run: |
66-
set -vx
67-
getent group render | awk -F : '{ print "RUN groupadd -g "$3" render && usermod -a -G render ghrunner" }' >>Dockerfile
68-
docker build . ${{ inputs.reset-cache && '--no-cache' || '' }}--tag hdk-build.${{ inputs.name }}
69-
docker run -id --name hdk-build.${{ inputs.name }} --network host --device /dev/dri:/dev/dri hdk-build.${{ inputs.name }}:latest
64+
docker build . \
65+
--build-arg http_proxy \
66+
--build-arg https_proxy \
67+
--build-arg no_proxy \
68+
${{ inputs.reset-cache && '--no-cache ' || ' ' }} --tag hdk-build.${{ inputs.name }}
69+
docker run \
70+
--env http_proxy \
71+
--env https_proxy \
72+
--env no_proxy \
73+
-id --name hdk-build.${{ inputs.name }} --network host $devices hdk-build.${{ inputs.name }}:latest
7074
7175
- name: Copy files into the container
7276
run: |

0 commit comments

Comments
 (0)