Skip to content

Commit 05ef6fd

Browse files
committed
CI: add --init to all docker run to avoid zombie process as much as possible
1 parent a758a58 commit 05ef6fd

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/docker-devito.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,26 @@ jobs:
2020
include:
2121
- base: 'bases:nvidia-nvc'
2222
tag: 'nvidia-nvc'
23-
flag: '--gpus all'
23+
flag: '--init --gpus all'
2424
test: 'tests/test_gpu_openacc.py tests/test_gpu_common.py'
2525
runner: ["self-hosted", "nvidiagpu"]
2626

2727
# Runtime gpu flags from https://hub.docker.com/r/rocm/tensorflow/
2828
- base: 'bases:amd'
2929
tag: 'amd'
30-
flag: '--network=host --device=/dev/kfd --device=/dev/dri --ipc=host --group-add video --group-add $(getent group render | cut -d: -f3) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined'
30+
flag: '--init --network=host --device=/dev/kfd --device=/dev/dri --ipc=host --group-add video --group-add $(getent group render | cut -d: -f3) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined'
3131
test: 'tests/test_gpu_openmp.py'
3232
runner: ["self-hosted", "amdgpu"]
3333

3434
- base: 'bases:cpu-gcc'
3535
tag: "gcc"
36-
flag: ''
36+
flag: '--init'
3737
test: 'tests/test_operator.py'
3838
runner: ubuntu-latest
3939

4040
- base: 'bases:cpu-icx'
4141
tag: "icx"
42-
flag: ''
42+
flag: '--init'
4343
test: 'tests/test_operator.py'
4444
runner: ubuntu-latest
4545

.github/workflows/pytest-core-mpi.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ jobs:
8787
8888
- name: Test with pytest
8989
run: |
90-
docker run --rm -t -e CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} -e OMP_NUM_THREADS=1 --name testrun devito_img pytest tests/test_mpi.py
90+
docker run --init --rm -t -e CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} -e OMP_NUM_THREADS=1 --name testrun devito_img pytest tests/test_mpi.py
9191
9292
- name: Test examples with MPI
9393
run: |
94-
docker run --rm -t ${{ matrix.mpiflag }} -e DEVITO_MPI=1 -e OMP_NUM_THREADS=1 --name examplerun devito_img mpiexec -n 2 pytest examples/seismic/acoustic
95-
docker run --rm -t -e DEVITO_MPI=1 -e OMP_NUM_THREADS=1 --name examplerun devito_img mpiexec -n 2 pytest examples/seismic/tti
94+
docker run --init --rm -t ${{ matrix.mpiflag }} -e DEVITO_MPI=1 -e OMP_NUM_THREADS=1 --name examplerun devito_img mpiexec -n 2 pytest examples/seismic/acoustic
95+
docker run --init --rm -t -e DEVITO_MPI=1 -e OMP_NUM_THREADS=1 --name examplerun devito_img mpiexec -n 2 pytest examples/seismic/tti

.github/workflows/pytest-core-nompi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
- name: Set run prefix
135135
run: |
136136
if [[ "${{ matrix.name }}" =~ "docker" ]]; then
137-
echo "RUN_CMD=docker run --rm -t -e CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} --name testrun devito_img" >> $GITHUB_ENV
137+
echo "RUN_CMD=docker run --init --rm -t -e CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} --name testrun devito_img" >> $GITHUB_ENV
138138
else
139139
echo "RUN_CMD=" >> $GITHUB_ENV
140140
fi

.github/workflows/tutorials.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
- name: Set run prefix
7676
run: |
7777
if [ "${{ matrix.name }}" == 'tutos-docker-gcc-py39' ]; then
78-
echo "RUN_CMD=docker run --rm -t --name testrun devito_img" >> $GITHUB_ENV
78+
echo "RUN_CMD=docker run --init --rm -t --name testrun devito_img" >> $GITHUB_ENV
7979
else
8080
echo "RUN_CMD=" >> $GITHUB_ENV
8181
fi

0 commit comments

Comments
 (0)