Skip to content

Commit 34cfdf4

Browse files
committed
docker: add some tweaks from Ken
1 parent 44ee680 commit 34cfdf4

File tree

5 files changed

+53
-60
lines changed

5 files changed

+53
-60
lines changed

.github/workflows/docker-bases.yml

+44-42
Original file line numberDiff line numberDiff line change
@@ -162,47 +162,6 @@ jobs:
162162
build-args: 'arch=nvc-host'
163163
tags: 'devitocodes/bases:cpu-nvc'
164164

165-
#######################################################
166-
################### Nvidia clang ######################
167-
#######################################################
168-
deploy-nvidia-clang-base:
169-
name: "nvidia-clang-base"
170-
runs-on: ["self-hosted", "nvidiagpu"]
171-
env:
172-
DOCKER_BUILDKIT: "1"
173-
174-
steps:
175-
- name: Checkout devito
176-
uses: actions/checkout@v3
177-
178-
- name: Check event name
179-
run: echo ${{ github.event_name }}
180-
181-
- name: Set up QEMU
182-
uses: docker/setup-qemu-action@v2
183-
184-
- name: Set up Docker Buildx
185-
uses: docker/setup-buildx-action@v2
186-
187-
- name: Login to DockerHub
188-
uses: docker/login-action@v2
189-
with:
190-
username: ${{ secrets.DOCKER_USERNAME }}
191-
password: ${{ secrets.DOCKER_PASSWORD }}
192-
193-
- name: cleanup
194-
run: docker system prune -a -f
195-
196-
- name: Nvidia clang image
197-
uses: docker/build-push-action@v3
198-
with:
199-
context: .
200-
file: './docker/Dockerfile.nvidia'
201-
push: true
202-
target: 'clang'
203-
build-args: 'arch=clang'
204-
tags: 'devitocodes/bases:nvidia-clang'
205-
206165
#######################################################
207166
##################### AMD #############################
208167
#######################################################
@@ -252,4 +211,47 @@ jobs:
252211
target: 'hip'
253212
build-args: |
254213
arch=hip
255-
tags: devitocodes/bases:amd-hip
214+
tags: devitocodes/bases:amd-hip
215+
216+
#######################################################
217+
################### Nvidia clang ######################
218+
# Currently disabled as nvc+openacc is the config of choice and this is time and resources consuming
219+
# Keeping it as legacy in case we want to reactivate it
220+
#######################################################
221+
# deploy-nvidia-clang-base:
222+
# name: "nvidia-clang-base"
223+
# runs-on: ["self-hosted", "nvidiagpu"]
224+
# env:
225+
# DOCKER_BUILDKIT: "1"
226+
227+
# steps:
228+
# - name: Checkout devito
229+
# uses: actions/checkout@v3
230+
231+
# - name: Check event name
232+
# run: echo ${{ github.event_name }}
233+
234+
# - name: Set up QEMU
235+
# uses: docker/setup-qemu-action@v2
236+
237+
# - name: Set up Docker Buildx
238+
# uses: docker/setup-buildx-action@v2
239+
240+
# - name: Login to DockerHub
241+
# uses: docker/login-action@v2
242+
# with:
243+
# username: ${{ secrets.DOCKER_USERNAME }}
244+
# password: ${{ secrets.DOCKER_PASSWORD }}
245+
246+
# - name: cleanup
247+
# run: docker system prune -a -f
248+
249+
# - name: Nvidia clang image
250+
# uses: docker/build-push-action@v3
251+
# with:
252+
# context: .
253+
# file: './docker/Dockerfile.nvidia'
254+
# push: true
255+
# target: 'clang'
256+
# build-args: 'arch=clang'
257+
# tags: 'devitocodes/bases:nvidia-clang'

.github/workflows/docker-devito.yml

-6
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ jobs:
2424
test: 'tests/test_gpu_openacc.py tests/test_gpu_common.py'
2525
runner: ["self-hosted", "nvidiagpu"]
2626

27-
- base: 'bases:nvidia-clang'
28-
tag: 'nvidia-clang'
29-
flag: '--gpus all'
30-
test: 'tests/test_gpu_openmp.py tests/test_gpu_common.py'
31-
runner: ["self-hosted", "nvidiagpu"]
32-
3327
# Runtime gpu flags from https://hub.docker.com/r/rocm/tensorflow/
3428
- base: 'bases:amd'
3529
tag: 'amd'

.github/workflows/pytest-gpu.yml

-8
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,12 @@ jobs:
4646

4747
matrix:
4848
name: [
49-
pytest-gpu-omp-nvidia,
5049
pytest-gpu-acc-nvidia,
5150
pytest-gpu-omp-amd
5251
]
5352
test_examples: ["examples/seismic/tti/tti_example.py examples/seismic/acoustic/acoustic_example.py examples/seismic/viscoacoustic/viscoacoustic_example.py examples/seismic/viscoelastic/viscoelastic_example.py examples/seismic/elastic/elastic_example.py"]
5453

5554
include:
56-
- name: pytest-gpu-omp-nvidia
57-
test_files: "tests/test_adjoint.py tests/test_gpu_common.py tests/test_gpu_openmp.py"
58-
base: "devitocodes/bases:nvidia-clang"
59-
tags: ["self-hosted", "nvidiagpu"]
60-
test_drive_cmd: "nvidia-smi"
61-
flags: '--gpus all --rm --name testrun-clang-nvidia'
62-
6355
- name: pytest-gpu-acc-nvidia
6456
test_files: "tests/test_adjoint.py tests/test_gpu_common.py tests/test_gpu_openacc.py"
6557
base: "devitocodes/bases:nvidia-nvc"

docker/Dockerfile.nvidia

+8-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ ARG arch="nvc"
88
########################################################################
99
# Build base image with apt setup and common env
1010
########################################################################
11-
FROM ${pyversion}-slim-bullseye as sdk-base
11+
FROM ubuntu:22.04 as sdk-base
1212

1313
ENV DEBIAN_FRONTEND noninteractive
1414

15-
RUN apt-get update -y && apt-get install -y -q gpg apt-utils curl wget vim libnuma-dev tmux numactl
15+
RUN apt-get update -y && \
16+
apt-get install -y -q gpg apt-utils curl wget vim libnuma-dev tmux numactl
17+
18+
#Install python
19+
RUN apt-get update && \
20+
apt-get install -y dh-autoreconf python3-venv python3-dev python3-pip
1621

1722
# nodesource: nvdashboard requires nodejs>=10
1823
RUN curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | gpg --yes --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
@@ -81,7 +86,7 @@ RUN export NVARCH=$(ls -1 /opt/nvidia/hpc_sdk/Linux_x86_64/ | grep '\.' | head -
8186
ln -sf /opt/nvidia/hpc_sdk/Linux_x86_64/comm_libs/${CUDA_V}/nccl /opt/nvhpc/comm_libs/nccl
8287

8388
# Starting nvhpc 23.5 and cuda 12.1, hpcx and openmpi are inside the cuda version folder, only the bin is in the comm_libs path
84-
RUN export CUDA_V=$(ls /opt/nvhpc/${NVARCH}/cuda/ | grep '\.') && \
89+
RUN export CUDA_V=$(nvcc --version | sed -n 's/^.*release \([0-9]\+\.[0-9]\+\).*$/\1/p') && \
8590
ls /opt/nvhpc/comm_libs/${CUDA_V}/hpcx/ &&\
8691
if [ -d /opt/nvhpc/comm_libs/${CUDA_V}/hpcx ]; then \
8792
rm -rf /opt/nvhpc/comm_libs/hpcx && rm -rf /opt/nvhpc/comm_libs/openmpi4 && \

requirements-nvidia.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cupy-cuda110
1+
cupy-cuda12x
22
dask-cuda
33
jupyterlab>=3
44
jupyterlab-nvdashboard

0 commit comments

Comments
 (0)