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

Commit

Permalink
More docker fixes, r3
Browse files Browse the repository at this point in the history
  • Loading branch information
leshikus committed Oct 12, 2023
1 parent 0308e70 commit 4a33a7c
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,36 +52,27 @@ jobs:
run: |
tar -zxf build.tgz
cat docker/Dockerfile docker/Dockerfile.${{ inputs.name }} >Dockerfile
test '${{ inputs.name }}' = 'l0' || exit 0
getent group render | awk -F : '{ print "RUN groupadd -g "$3" render && usermod -a -G render ghrunner" }' >>Dockerfile
- name: Build the container
devices=$(find /dev -type c -name 'nvidia*' | awk '{ print " --device "$1":"$1 }')
test ! -d /dev/dri || {
device="$devices --device /dev/dri:/dev/dri"
getent group render | awk -F : '{ print "RUN groupadd -g "$3" render && usermod -a -G render ghrunner" }' >>Dockerfile
}
echo devices=$devices >>$GITHUB_ENV
- name: Build and start the container
run: |
set -vx
docker build . \
--build-arg http_proxy \
--build-arg https_proxy \
--build-arg no_proxy \
${{ inputs.reset-cache && '--no-cache ' || ' ' }} --tag hdk-build.${{ inputs.name }}
- name: Start the container
if: inputs.name != 'l0'
run: |
set -vx
docker run \
--env http_proxy \
--env https_proxy \
--env no_proxy \
-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
- name: Start L0 container
if: inputs.name == 'l0'
run: |
set -vx
docker run \
--env http_proxy \
--env https_proxy \
--env no_proxy \
-id --name hdk-build.${{ inputs.name }} --network host --device /dev/dri:/dev/dri hdk-build.${{ inputs.name }}:latest
-id --name hdk-build.${{ inputs.name }} --network host ${{ devices }} hdk-build.${{ inputs.name }}:latest
- name: Copy files into the container
run: |
Expand Down

0 comments on commit 4a33a7c

Please sign in to comment.