Update CI containers to oneAPI 2021.4.0
[alexxy/gromacs.git] / admin / containers / scripted_gmx_docker_builds.py
index ecdbb27b0399aa2acf6c583976af22da395f8343..08e16d1c171e3f9c5e6d53d93c8b00d6fc15ccdd 100755 (executable)
@@ -124,19 +124,10 @@ _rocm_extra_packages = [
 ]
 
 # Extra packages needed to build Intel Compute Runtime
-_intel_compute_runtime_extra_packages = ['libigc',
-                                         'libigc-dev',
-                                         'libigdgmm11',
-                                         'libigdgmm-dev',
-                                         'libxml2',
-                                         'libxml2-dev',
-                                         'libze-loader',
-                                         'libze-loader-dev',
-                                         'ocl-icd-libopencl1',
-                                         'ocl-icd-opencl-dev',
-                                         'opencl-headers',
-                                         'pkg-config',
-                                         ]
+_intel_compute_runtime_extra_packages = ['intel-opencl-icd',
+                                         'intel-level-zero-gpu',
+                                         'level-zero',
+                                         'libmfx1']
 
 # Extra packages needed to build Python installations from source.
 _python_extra_packages = ['build-essential',
@@ -419,25 +410,6 @@ def get_hipsycl(args):
         postinstall=postinstall)
 
 
-def get_intel_compute_runtime(args):
-    # The only reason we need to build Compute Runtime ourselves is because Intel packages have no DG1 support
-    # Otherwise, we could have just installed DEB packages from GitHub or Intel PPA
-    if args.intel_compute_runtime is None:
-        return None
-
-    cmake_opts = ['-DCMAKE_BUILD_TYPE=Release',
-                  '-DSKIP_UNIT_TESTS=TRUE',
-                  '-DSUPPORT_GEN8=0', '-DSUPPORT_GEN9=1', '-DSUPPORT_GEN11=1', '-DSUPPORT_GEN12LP=1', '-DSUPPORT_DG1=1',
-                  '-DBUILD_WITH_L0=1']
-
-    return hpccm.building_blocks.generic_cmake(
-        repository='https://github.com/intel/compute-runtime.git',
-        directory='compute-runtime',
-        prefix='/usr/local', recursive=True, branch=args.intel_compute_runtime,
-        cmake_opts=cmake_opts,
-        postinstall=['ldconfig'])
-
-
 def add_tsan_compiler_build_stage(input_args, output_stages: typing.Mapping[str, hpccm.Stage]):
     """Isolate the expensive TSAN preparation stage.
 
@@ -728,9 +700,13 @@ def build_stages(args) -> typing.Iterable[hpccm.Stage]:
         os_packages += ['lsb-release']
     if args.hipsycl is not None:
         os_packages += ['libboost-fiber-dev']
-    if args.intel_compute_runtime is not None:
-        os_packages += _intel_compute_runtime_extra_packages
     building_blocks['extra_packages'] = []
+    if args.intel_compute_runtime:
+        building_blocks['extra_packages'] += hpccm.building_blocks.packages(
+            apt_keys=['https://repositories.intel.com/graphics/intel-graphics.key'],
+            apt_repositories=[f'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main']
+        )
+        os_packages += _intel_compute_runtime_extra_packages
     if args.rocm is not None:
         building_blocks['extra_packages'] += hpccm.building_blocks.packages(
             apt_keys=['http://repo.radeon.com/rocm/rocm.gpg.key'],
@@ -760,8 +736,6 @@ def build_stages(args) -> typing.Iterable[hpccm.Stage]:
 
     building_blocks['hipSYCL'] = get_hipsycl(args)
 
-    building_blocks['intel-compute-runtime'] = get_intel_compute_runtime(args)
-
     # Add Python environments to MPI images, only, so we don't have to worry
     # about whether to install mpi4py.
     if args.mpi is not None and len(args.venvs) > 0: