Skip to content
Snippets Groups Projects
intel-docker.md 1.79 KiB
Newer Older

# Running Intel oneAPI with docker

If you want to run within a container, a set of predefined images are usable:
- the [default oneAPI image](intel/oneapi-basekit) (4.26 GiB) which see your Intel CPU and iGPU.
- a ["smaller" oneAPI image](gitlab-registry.in2p3.fr/codeursintensifs/grayscott/grayscottsyclsetup/jfalcou:2024.1) (2.29 GiB) which only see your Intel CPU.
- a ["bigger" oneAPI image](gitlab-registry.in2p3.fr/codeursintensifs/grayscott/grayscottsyclsetup/dchamont:2024.1) (5.29 GiB) which add the NVidia codeplay plugin, and therefore also see your NVidia card, if you have one.

We recommend you to start your container with the following command, which sets some useful options for Intel GPU (`--device=/dev/dri`) and|or NVidia card (`--gpus all`), and mount the current directory as `/work` in the container:

```sh
IMG=gitlab-registry.in2p3.fr/codeursintensifs/grayscott/grayscottsyclsetup/dchamont:2024.1
docker pull ${IMG}
docker run --gpus all --device=/dev/dri --network host -it --rm -v ${PWD}:/work -w /work ${IMG}
```

First check that the installation is OK with `sycl-ls`, and `nvidia-smi` if you have a CUDA card.
Then you can go through the test program for CPU and|or CUDA:

```sh
# move to the top directory
cd GrayScottSyclSetup/

# check CPU nodes
IMG=gitlab-registry.in2p3.fr/codeursintensifs/grayscott/grayscottsyclsetup/jfalcou:2024.1
docker run --gpus all --device=/dev/dri --network host -it --rm -v ${PWD}:/work -w /work ${IMG}
cd CheckOneApiCpu
./sycl-ls.bash
./cmake.bash
./make.bash
./run.bash
exit

# Check GPU nodes
IMG=gitlab-registry.in2p3.fr/codeursintensifs/grayscott/grayscottsyclsetup/dchamont:2024.1
docker run --gpus all --device=/dev/dri --network host -it --rm -v ${PWD}:/work -w /work ${IMG}
cd CheckOneApiCuda
nvidia-smi
./sycl-ls.bash
./cmake.bash
./make.bash
./run.bash
exit
```