1
1
# syntax=docker/dockerfile:1.3
2
2
# NB: at least 1.3 is needed to benefit from ARG expansion in bind mount arguments
3
- ARG PYTHON_VERSION=3.9.16
3
+ ARG PYTHON_VERSION=3.9.17
4
4
5
5
# Driver args
6
- # print on gpu is broken for 22.43.24595.30 + igc-1.0.12812.26
7
- ARG CR_TAG=22.43.24595.30
8
- ARG IGC_TAG=igc-1.0.12504.5
6
+ # print on gpu is broken for 22.43.24595.30 + igc-1.0.12812.26 refer to these
7
+ # versions for testing (all tests pass on them):
8
+ # ARG CR_TAG=22.43.24595.30
9
+ # ARG IGC_TAG=igc-1.0.12504.5
10
+ # ARG CR_TAG=latest
11
+ # ARG IGC_TAG=latest
12
+ ARG CR_TAG=23.13.26032.30
13
+ ARG IGC_TAG=igc-1.0.13700.14
9
14
ARG CM_TAG=latest
15
+ # level-zero v1.10.0+ depends on libstdc++6 (>= 11); however bullseye is based
16
+ # on gcc 10
17
+ # ARG L0_TAG=v1.9.9
10
18
ARG L0_TAG=latest
11
19
12
20
# ONEAPI
13
- ARG ONEAPI_INSTALLER_URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/19079
14
- ARG ONEAPI_VERSION=2023.0.0
15
- ARG ONEAPI_INSTALL_BINARY_NAME=l_BaseKit_p_$ONEAPI_VERSION.25537. sh
21
+ ARG ONEAPI_INSTALLER_URL=https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7deeaac4-f605-4bcf-a81b-ea7531577c61
22
+ ARG ONEAPI_VERSION=2023.1.0.46401
23
+ ARG ONEAPI_INSTALL_BINARY_NAME=l_BaseKit_p_$ONEAPI_VERSION.sh
16
24
ARG ONEAPI_INSTALL_DIR=/opt/intel/oneapi
17
25
18
26
# Versions of the intel python packages
19
- ARG DPCTL_GIT_BRANCH=0.14.2
27
+ ARG DPCTL_GIT_BRANCH=0.14.4
20
28
ARG DPCTL_GIT_URL=https://github.com/IntelPython/dpctl.git
21
29
22
- ARG DPNP_GIT_BRANCH=0.11.1
30
+ ARG DPNP_GIT_BRANCH=0.12.0
23
31
ARG DPNP_GIT_URL=https://github.com/IntelPython/dpnp.git
24
32
25
- ARG NUMBA_DPEX_GIT_BRANCH=0.20.0
33
+ ARG DPCPP_LLVM_SPIRV_GIT_BRANCH=main
34
+ ARG DPCPP_LLVM_SPIRV_GIT_URL=https://github.com/IntelPython/dpcpp-llvm-spirv.git
35
+
36
+ ARG NUMBA_DPEX_GIT_BRANCH=0.22.0
26
37
ARG NUMBA_DPEX_GIT_URL=https://github.com/IntelPython/numba-dpex.git
27
38
28
39
# CMAKE
29
- ARG CMAKE_VERSION=3.25
30
- ARG CMAKE_VERSION_BUILD=3
40
+ ARG CMAKE_VERSION=3.26
41
+ ARG CMAKE_VERSION_BUILD=4
31
42
32
43
# Python
33
- ARG INTEL_NUMPY_VERSION="==1.22.3"
34
- ARG INTEL_NUMBA_VERSION="==0.56.4"
35
- ARG SCIKIT_BUILD_VERSION="==0.16.7"
44
+ ARG INTEL_NUMPY_VERSION="==1.24.3"
45
+ ARG INTEL_NUMBA_VERSION="==0.57.0"
46
+ ARG CYTHON_VERSION="==0.29.35"
47
+ ARG SCIKIT_BUILD_VERSION="==0.17.6"
36
48
37
49
# If you are have access to the internet via proxy.
38
50
# It is required for loading packages.
@@ -45,11 +57,12 @@ ARG GITHUB_USER=''
45
57
ARG GITHUB_PASSWORD=''
46
58
47
59
# Image names used in multistage build
48
- ARG BASE_IMAGE=python:$PYTHON_VERSION-slim-bullseye
60
+ ARG BASE_IMAGE=python:$PYTHON_VERSION-slim-bookworm
49
61
ARG RUNTIME_BASE_IMAGE=runtime-base
50
62
ARG BUILDER_IMAGE=builder
51
63
ARG DPCTL_BUILDER_IMAGE=dpctl-builder
52
64
ARG DPNP_BUILDER_IMAGE=dpnp-builder
65
+ ARG DPCPP_LLVM_SPIRV_BUILDER_IMAGE=dpcpp-llvm-spirv-builder
53
66
ARG NUMBA_DPEX_BUILDER_IMAGE=numba-dpex-builder
54
67
ARG TOOLKIT_IMAGE=toolkit
55
68
ARG NUMBA_DPEX_BUILDER_RUNTIME_IMAGE=numba-dpex-builder-runtime
@@ -283,37 +296,33 @@ RUN \
283
296
&& pip install -U \
284
297
numba${INTEL_NUMBA_VERSION} \
285
298
numpy${INTEL_NUMPY_VERSION} \
299
+ cython${CYTHON_VERSION} \
286
300
scikit-build${SCIKIT_BUILD_VERSION}
287
301
288
302
289
303
FROM $BUILDER_IMAGE AS dpctl-builder
290
- ARG ONEAPI_INSTALL_DIR
291
304
ARG DPCTL_GIT_BRANCH
292
305
ARG DPCTL_GIT_URL
293
306
ARG DPCTL_BUILD_DIR=/build
294
307
ARG DPCTL_DIST_DIR=/dist
295
308
ARG SKBUILD_ARGS="-- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx"
296
- ARG SKBUILD_CACHE=/root/.cache/_skbuild/
297
309
ARG http_proxy
298
310
ARG https_proxy
299
311
300
312
RUN \
301
- export http_proxy=$http_proxy https_proxy=$https_proxy \
302
- && mkdir -p $DPCTL_BUILD_DIR \
303
- && mkdir $DPCTL_DIST_DIR \
304
- && cd $DPCTL_BUILD_DIR \
305
- && cd $DPCTL_BUILD_DIR \
306
- && git clone --recursive -b $DPCTL_GIT_BRANCH --depth 1 $DPCTL_GIT_URL . \
307
- && find $DPCTL_BUILD_DIR -type f -exec sed -i 's/inserter/_inserter/g' {} + `TODO: remove once fixed` \
308
- && python setup.py bdist_wheel ${SKBUILD_ARGS} \
309
- && cp dist/dpctl*.whl $DPCTL_DIST_DIR
313
+ export http_proxy=$http_proxy https_proxy=$https_proxy \
314
+ && mkdir -p $DPCTL_BUILD_DIR \
315
+ && mkdir $DPCTL_DIST_DIR \
316
+ && cd $DPCTL_BUILD_DIR \
317
+ && git clone --recursive -b $DPCTL_GIT_BRANCH --depth 1 $DPCTL_GIT_URL . \
318
+ && python setup.py bdist_wheel ${SKBUILD_ARGS} \
319
+ && cp dist/dpctl*.whl $DPCTL_DIST_DIR
310
320
311
321
312
322
FROM $DPCTL_BUILDER_IMAGE AS dpctl-builder-dist
313
323
314
324
315
325
FROM $BUILDER_IMAGE AS dpnp-builder
316
- ARG ONEAPI_INSTALL_DIR
317
326
ARG DPNP_BUILD_DIR=/build
318
327
ARG DPNP_DIST_DIR=/dist
319
328
ARG DPNP_GIT_BRANCH
@@ -331,17 +340,42 @@ RUN \
331
340
&& mkdir -p $DPNP_DIST_DIR \
332
341
&& cd $DPNP_BUILD_DIR \
333
342
&& git clone --recursive -b $DPNP_GIT_BRANCH --depth 1 $DPNP_GIT_URL . \
334
- && export DPLROOT=$ONEAPI_ROOT/dpl/latest \
335
- && python setup.py build_clib \
336
- && export CC=dpcpp \
337
- && python setup.py build_ext \
338
- && python setup.py bdist_wheel \
343
+ && export DPCTL_MODULE_PATH=$(python -m dpctl --cmakedir) \
344
+ && export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$DPCTL_MODULE_PATH \
345
+ # && python setup.py build_clib ${SKBUILD_ARGS} \
346
+ # # && python setup.py build_ext ${SKBUILD_ARGS} \
347
+ && python setup.py bdist_wheel ${SKBUILD_ARGS} \
339
348
&& cp dist/dpnp*.whl $DPNP_DIST_DIR
340
349
341
350
342
351
FROM $DPNP_BUILDER_IMAGE AS dpnp-builder-dist
343
352
344
353
354
+ FROM $BUILDER_IMAGE AS dpcpp-llvm-spirv-builder
355
+
356
+ ARG ONEAPI_INSTALL_DIR
357
+ ARG DPCPP_LLVM_SPIRV_GIT_BRANCH
358
+ ARG DPCPP_LLVM_SPIRV_GIT_URL
359
+ ARG DPCPP_LLVM_SPIRV_BUILD_DIR=/build
360
+ ARG DPCPP_LLVM_SPIRV_DIST_DIR=/dist
361
+ ARG http_proxy
362
+ ARG https_proxy
363
+
364
+ RUN \
365
+ export http_proxy=$http_proxy https_proxy=$https_proxy \
366
+ && mkdir -p $DPCPP_LLVM_SPIRV_BUILD_DIR \
367
+ && mkdir $DPCPP_LLVM_SPIRV_DIST_DIR \
368
+ && cd $DPCPP_LLVM_SPIRV_BUILD_DIR \
369
+ && cd $DPCPP_LLVM_SPIRV_BUILD_DIR \
370
+ && git clone --recursive -b $DPCPP_LLVM_SPIRV_GIT_BRANCH --depth 1 $DPCPP_LLVM_SPIRV_GIT_URL . \
371
+ && cd pkg \
372
+ && python setup.py bdist_wheel \
373
+ && cp dist/dpcpp_llvm_spirv*.whl $DPCPP_LLVM_SPIRV_DIST_DIR
374
+
375
+
376
+ FROM $DPCPP_LLVM_SPIRV_BUILDER_IMAGE AS dpcpp-llvm-spirv-dist
377
+
378
+
345
379
FROM $BUILDER_IMAGE AS numba-dpex-builder-runtime
346
380
ARG ONEAPI_INSTALL_DIR
347
381
ARG NUMBA_DPEX_BUILD_DIR=/build
@@ -354,17 +388,19 @@ ARG http_proxy
354
388
ARG https_proxy
355
389
356
390
RUN \
357
- --mount=type=bind,target=/mnt/dpctl,source=/dist,from=dpctl-builder-dist \
358
- --mount=type=bind,target=/mnt/dpnp,source=/dist,from=dpnp-builder-dist \
359
- --mount=type=cache,target=/root/.cache/pip/ \
360
- export http_proxy=$http_proxy https_proxy=$https_proxy \
361
- && pip install -U \
362
- /mnt/dpctl/dpctl*.whl /mnt/dpnp/dpnp*.whl \
363
- && mkdir -p $NUMBA_DPEX_BUILD_DIR \
364
- && mkdir $NUMBA_DPEX_DIST_DIR \
365
- && cd $NUMBA_DPEX_BUILD_DIR \
366
- && git clone --recursive -b $NUMBA_DPEX_GIT_BRANCH --depth 1 $NUMBA_DPEX_GIT_URL .
367
-
391
+ --mount=type=bind,target=/mnt/dpctl,source=/dist,from=dpctl-builder-dist \
392
+ --mount=type=bind,target=/mnt/dpnp,source=/dist,from=dpnp-builder-dist \
393
+ --mount=type=bind,target=/mnt/dpcpp_llvm_spirv,source=/dist,from=dpcpp-llvm-spirv-dist \
394
+ --mount=type=cache,target=/root/.cache/pip/ \
395
+ export http_proxy=$http_proxy https_proxy=$https_proxy \
396
+ && pip install -U \
397
+ /mnt/dpctl/dpctl*.whl /mnt/dpnp/dpnp*.whl \
398
+ /mnt/dpcpp_llvm_spirv/dpcpp_llvm_spirv*.whl \
399
+ && ln -s /usr/local/bin/llvm-spirv /usr/local/lib/python*/site-packages/dpcpp_llvm_spirv/ \
400
+ && mkdir -p $NUMBA_DPEX_BUILD_DIR \
401
+ && mkdir $NUMBA_DPEX_DIST_DIR \
402
+ && cd $NUMBA_DPEX_BUILD_DIR \
403
+ && git clone --recursive -b $NUMBA_DPEX_GIT_BRANCH --depth 1 $NUMBA_DPEX_GIT_URL .
368
404
369
405
FROM $NUMBA_DPEX_BUILDER_RUNTIME_IMAGE AS numba-dpex-builder
370
406
ARG NUMBA_DPEX_DIST_DIR=/dist
@@ -407,19 +443,23 @@ COPY --from=dpnp-builder-dist /build/tests /opt/dpnp/tests
407
443
408
444
# runtime python packages
409
445
RUN \
410
- --mount=type=bind,target=/mnt/dpctl,source=/dist,from=dpctl-builder-dist \
411
- --mount=type=bind,target=/mnt/dpnp,source=/dist,from=dpnp-builder-dist \
412
- --mount=type=bind,target=/mnt/numba_dpex,source=/dist,from=numba-dpex-builder \
413
- --mount=type=cache,target=/root/.cache/pip/ \
414
- export http_proxy=$http_proxy https_proxy=$https_proxy \
415
- && pip install -U \
416
- numpy${INTEL_NUMPY_VERSION} \
417
- numba${INTEL_NUMBA_VERSION} \
418
- /mnt/dpctl/dpctl*.whl \
419
- /mnt/dpnp/dpnp*.whl \
420
- /mnt/numba_dpex/numba_dpex*.whl \
421
- && fdupes -qio name /usr/local/lib/python*/site-packages/dpctl/ | \
422
- awk '{if ($0=="") ln=""; else if (ln=="") ln = $0; else system("rm " $0 ";\t ln -s " ln " " $0) }'
446
+ --mount=type=bind,target=/mnt/dpctl,source=/dist,from=dpctl-builder-dist \
447
+ --mount=type=bind,target=/mnt/dpnp,source=/dist,from=dpnp-builder-dist \
448
+ --mount=type=bind,target=/mnt/dpcpp_llvm_spirv,source=/dist,from=dpcpp-llvm-spirv-dist \
449
+ --mount=type=bind,target=/mnt/numba_dpex,source=/dist,from=numba-dpex-builder \
450
+ --mount=type=cache,target=/root/.cache/pip/ \
451
+ export http_proxy=$http_proxy https_proxy=$https_proxy \
452
+ && pip install -U \
453
+ numpy${INTEL_NUMPY_VERSION} \
454
+ cython${CYTHON_VERSION} \
455
+ numba${INTEL_NUMBA_VERSION} \
456
+ /mnt/dpctl/dpctl*.whl \
457
+ /mnt/dpnp/dpnp*.whl \
458
+ /mnt/dpcpp_llvm_spirv/dpcpp_llvm_spirv*.whl \
459
+ /mnt/numba_dpex/numba_dpex*.whl \
460
+ && ln -s /usr/local/bin/llvm-spirv /usr/local/lib/python*/site-packages/dpcpp_llvm_spirv/ \
461
+ && fdupes -qio name /usr/local/lib/python*/site-packages/dpctl/ | \
462
+ awk '{if ($0=="") ln=""; else if (ln=="") ln = $0; else system("rm " $0 ";\t ln -s " ln " " $0) }'
423
463
424
464
# Create an user
425
465
# TODO: there is no access to gpu with non root user. Same issue on intel/llvm docker.
0 commit comments