Error in installing habanalabs-dkms in ubunti 20.04 based docker image

I am building a docker image (Base Image is Ubuntu 20.04) and installing habana libraries from link Intel Gaudi Software Stack and Driver Installation — Gaudi Documentation 1.15.0 documentation
uname -a → Linux abcd 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
pyhton version 3.11

While building the image in the step sudo apt install -y habanalabs-dkms I am getting below error -

=> ERROR [10/27] RUN apt install -y habanalabs-dkms 63.0s

[10/27] RUN apt install -y habanalabs-dkms:
0.461
0.461 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0.461
0.517 Reading package lists…
1.880 Building dependency tree…
2.102 Reading state information…
2.290 The following additional packages will be installed:
2.290 binutils build-essential cpp cpp-9 dctrl-tools dkms dpkg-dev fakeroot g++
2.290 g+±9 gcc gcc-9 gcc-9-base kmod libalgorithm-diff-perl
2.290 libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1
2.290 libcc1-0 libelf-dev libfakeroot libgcc-9-dev libgomp1 libisl22 libitm1
2.290 liblsan0 libmpc3 libmpfr6 libstdc+±9-dev libtsan0 libubsan1 make patch sudo
2.291 Suggested packages:
2.291 binutils-doc cpp-doc gcc-9-locales debtags menu debian-keyring g+±multilib
2.291 g+±9-multilib gcc-9-doc gcc-multilib autoconf automake libtool flex bison
2.291 gdb gcc-doc gcc-9-multilib libstdc+±9-doc make-doc ed diffutils-doc
2.360 The following NEW packages will be installed:
2.360 binutils build-essential cpp cpp-9 dctrl-tools dkms dpkg-dev fakeroot g++
2.360 g+±9 gcc gcc-9 gcc-9-base habanalabs-dkms kmod libalgorithm-diff-perl
2.360 libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1
2.360 libcc1-0 libelf-dev libfakeroot libgcc-9-dev libgomp1 libisl22 libitm1
2.361 liblsan0 libmpc3 libmpfr6 libstdc+±9-dev libtsan0 libubsan1 make patch sudo
2.833 0 upgraded, 36 newly installed, 0 to remove and 58 not upgraded.
2.833 Need to get 40.5 MB of archives.
2.833 After this operation, 161 MB of additional disk space will be used.
2.833 Get:2 Index of /ubuntu focal-updates/main amd64 kmod amd64 27-1ubuntu2.1 [94.8 kB]
2.962 Get:1 JFrog focal/main amd64 habanalabs-dkms all 1.13.0-463 [2,786 kB]
3.277 Get:3 Index of /ubuntu focal-updates/main amd64 gcc-9-base amd64 9.4.0-1ubuntu1~20.04.2 [18.9 kB]
3.436 Get:4 Index of /ubuntu focal/main amd64 libisl22 amd64 0.22.1-1 [592 kB]
3.954 Get:5 Index of /ubuntu focal/main amd64 libmpfr6 amd64 4.0.2-1 [240 kB]
4.105 Get:6 Index of /ubuntu focal/main amd64 libmpc3 amd64 1.1.0-1 [40.8 kB]
4.249 Get:7 Index of /ubuntu focal-updates/main amd64 cpp-9 amd64 9.4.0-1ubuntu1~20.04.2 [7,502 kB]
4.954 Get:8 Index of /ubuntu focal/main amd64 cpp amd64 4:9.3.0-1ubuntu2 [27.6 kB]
4.958 Get:9 Index of /ubuntu focal-updates/main amd64 libcc1-0 amd64 10.5.0-1ubuntu1~20.04 [48.8 kB]
5.104 Get:10 Index of /ubuntu focal-updates/main amd64 binutils amd64 2.34-6ubuntu1.9 [3,380 B]
5.246 Get:11 Index of /ubuntu focal-updates/main amd64 libgomp1 amd64 10.5.0-1ubuntu1~20.04 [102 kB]
5.388 Get:12 Index of /ubuntu focal-updates/main amd64 libitm1 amd64 10.5.0-1ubuntu1~20.04 [26.2 kB]
5.531 Get:13 Index of /ubuntu focal-updates/main amd64 libatomic1 amd64 10.5.0-1ubuntu1~20.04 [9,284 B]
5.949 Get:14 Index of /ubuntu focal-updates/main amd64 libasan5 amd64 9.4.0-1ubuntu1~20.04.2 [2,752 kB]
7.045 Get:15 Index of /ubuntu focal-updates/main amd64 liblsan0 amd64 10.5.0-1ubuntu1~20.04 [835 kB]
7.215 Get:16 Index of /ubuntu focal-updates/main amd64 libtsan0 amd64 10.5.0-1ubuntu1~20.04 [2,016 kB]
7.423 Get:17 Index of /ubuntu focal-updates/main amd64 libubsan1 amd64 10.5.0-1ubuntu1~20.04 [785 kB]
7.591 Get:18 Index of /ubuntu focal-updates/main amd64 libgcc-9-dev amd64 9.4.0-1ubuntu1~20.04.2 [2,359 kB]
7.809 Get:19 Index of /ubuntu focal-updates/main amd64 gcc-9 amd64 9.4.0-1ubuntu1~20.04.2 [8,276 kB]
8.410 Get:19 Index of /ubuntu focal-updates/main amd64 gcc-9 amd64 9.4.0-1ubuntu1~20.04.2 [8,276 kB]
8.411 Get:20 Index of /ubuntu focal/main amd64 gcc amd64 4:9.3.0-1ubuntu2 [5,208 B]
8.453 Get:21 Index of /ubuntu focal/main amd64 patch amd64 2.7.6-6 [105 kB]
8.598 Get:22 Index of /ubuntu focal/main amd64 make amd64 4.2.1-1.2 [162 kB]
8.747 Get:23 Index of /ubuntu focal-updates/main amd64 dpkg-dev all 1.19.7ubuntu3.2 [679 kB]
8.905 Get:24 Index of /ubuntu focal-updates/main amd64 libstdc+±9-dev amd64 9.4.0-1ubuntu1~20.04.2 [1,722 kB]
9.342 Get:25 Index of /ubuntu focal-updates/main amd64 g+±9 amd64 9.4.0-1ubuntu1~20.04.2 [8,421 kB]
10.59 Get:26 Index of /ubuntu focal/main amd64 g++ amd64 4:9.3.0-1ubuntu2 [1,604 B]
10.74 Get:27 Index of /ubuntu focal-updates/main amd64 build-essential amd64 12.8ubuntu1.1 [4,664 B]
10.74 Get:28 Index of /ubuntu focal/main amd64 dctrl-tools amd64 2.24-3 [61.5 kB]
10.88 Get:29 Index of /ubuntu focal-updates/main amd64 dkms all 2.8.1-5ubuntu2 [66.8 kB]
11.03 Get:30 Index of /ubuntu focal-updates/main amd64 sudo amd64 1.8.31-1ubuntu1.5 [515 kB]
11.18 Get:31 Index of /ubuntu focal/main amd64 libfakeroot amd64 1.24-1 [25.7 kB]
11.32 Get:32 Index of /ubuntu focal/main amd64 fakeroot amd64 1.24-1 [62.6 kB]
11.46 Get:33 Index of /ubuntu focal-updates/main amd64 libelf-dev amd64 0.176-1.1ubuntu0.1 [57.1 kB]
11.61 Get:34 Index of /ubuntu focal/main amd64 libalgorithm-diff-perl all 1.19.03-2 [46.6 kB]
11.75 Get:35 Index of /ubuntu focal/main amd64 libalgorithm-diff-xs-perl amd64 0.04-6 [11.3 kB]
11.90 Get:36 Index of /ubuntu focal/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
12.10 debconf: delaying package configuration, since apt-utils is not installed
12.15 Fetched 32.2 MB in 10s (3,378 kB/s)
12.18 Selecting previously unselected package kmod.
(Reading database … 57611 files and directories currently installed.)
12.21 Preparing to unpack …/00-kmod_27-1ubuntu2.1_amd64.deb …
12.21 Unpacking kmod (27-1ubuntu2.1) …
12.25 Selecting previously unselected package gcc-9-base:amd64.
12.25 Preparing to unpack …/01-gcc-9-base_9.4.0-1ubuntu1~20.04.2_amd64.deb …
12.26 Unpacking gcc-9-base:amd64 (9.4.0-1ubuntu1~20.04.2) …
12.29 Selecting previously unselected package libisl22:amd64.
12.30 Preparing to unpack …/02-libisl22_0.22.1-1_amd64.deb …
12.30 Unpacking libisl22:amd64 (0.22.1-1) …
12.40 Selecting previously unselected package libmpfr6:amd64.
12.40 Preparing to unpack …/03-libmpfr6_4.0.2-1_amd64.deb …
12.40 Unpacking libmpfr6:amd64 (4.0.2-1) …
12.46 Selecting previously unselected package libmpc3:amd64.
12.46 Preparing to unpack …/04-libmpc3_1.1.0-1_amd64.deb …
12.46 Unpacking libmpc3:amd64 (1.1.0-1) …
12.49 Selecting previously unselected package cpp-9.
12.50 Preparing to unpack …/05-cpp-9_9.4.0-1ubuntu1~20.04.2_amd64.deb …
12.50 Unpacking cpp-9 (9.4.0-1ubuntu1~20.04.2) …
13.42 Selecting previously unselected package cpp.
13.42 Preparing to unpack …/06-cpp_4%3a9.3.0-1ubuntu2_amd64.deb …
13.43 Unpacking cpp (4:9.3.0-1ubuntu2) …
13.46 Selecting previously unselected package libcc1-0:amd64.
13.46 Preparing to unpack …/07-libcc1-0_10.5.0-1ubuntu1~20.04_amd64.deb …
13.46 Unpacking libcc1-0:amd64 (10.5.0-1ubuntu1~20.04) …
13.50 Selecting previously unselected package binutils.
13.50 Preparing to unpack …/08-binutils_2.34-6ubuntu1.9_amd64.deb …
13.50 Unpacking binutils (2.34-6ubuntu1.9) …
13.53 Selecting previously unselected package libgomp1:amd64.
13.54 Preparing to unpack …/09-libgomp1_10.5.0-1ubuntu1~20.04_amd64.deb …
13.54 Unpacking libgomp1:amd64 (10.5.0-1ubuntu1~20.04) …
13.58 Selecting previously unselected package libitm1:amd64.
13.59 Preparing to unpack …/10-libitm1_10.5.0-1ubuntu1~20.04_amd64.deb …
13.59 Unpacking libitm1:amd64 (10.5.0-1ubuntu1~20.04) …
13.62 Selecting previously unselected package libatomic1:amd64.
13.62 Preparing to unpack …/11-libatomic1_10.5.0-1ubuntu1~20.04_amd64.deb …
13.62 Unpacking libatomic1:amd64 (10.5.0-1ubuntu1~20.04) …
13.65 Selecting previously unselected package libasan5:amd64.
13.65 Preparing to unpack …/12-libasan5_9.4.0-1ubuntu1~20.04.2_amd64.deb …
13.66 Unpacking libasan5:amd64 (9.4.0-1ubuntu1~20.04.2) …
14.05 Selecting previously unselected package liblsan0:amd64.
14.06 Preparing to unpack …/13-liblsan0_10.5.0-1ubuntu1~20.04_amd64.deb …
14.06 Unpacking liblsan0:amd64 (10.5.0-1ubuntu1~20.04) …
14.20 Selecting previously unselected package libtsan0:amd64.
14.21 Preparing to unpack …/14-libtsan0_10.5.0-1ubuntu1~20.04_amd64.deb …
14.21 Unpacking libtsan0:amd64 (10.5.0-1ubuntu1~20.04) …
14.50 Selecting previously unselected package libubsan1:amd64.
14.51 Preparing to unpack …/15-libubsan1_10.5.0-1ubuntu1~20.04_amd64.deb …
14.51 Unpacking libubsan1:amd64 (10.5.0-1ubuntu1~20.04) …
14.63 Selecting previously unselected package libgcc-9-dev:amd64.
14.64 Preparing to unpack …/16-libgcc-9-dev_9.4.0-1ubuntu1~20.04.2_amd64.deb …
14.64 Unpacking libgcc-9-dev:amd64 (9.4.0-1ubuntu1~20.04.2) …
14.95 Selecting previously unselected package gcc-9.
14.95 Preparing to unpack …/17-gcc-9_9.4.0-1ubuntu1~20.04.2_amd64.deb …
14.95 Unpacking gcc-9 (9.4.0-1ubuntu1~20.04.2) …
15.92 Selecting previously unselected package gcc.
15.93 Preparing to unpack …/18-gcc_4%3a9.3.0-1ubuntu2_amd64.deb …
15.93 Unpacking gcc (4:9.3.0-1ubuntu2) …
15.96 Selecting previously unselected package patch.
15.96 Preparing to unpack …/19-patch_2.7.6-6_amd64.deb …
15.96 Unpacking patch (2.7.6-6) …
16.01 Selecting previously unselected package make.
16.01 Preparing to unpack …/20-make_4.2.1-1.2_amd64.deb …
16.01 Unpacking make (4.2.1-1.2) …
16.06 Selecting previously unselected package dpkg-dev.
16.07 Preparing to unpack …/21-dpkg-dev_1.19.7ubuntu3.2_all.deb …
16.07 Unpacking dpkg-dev (1.19.7ubuntu3.2) …
16.18 Selecting previously unselected package libstdc+±9-dev:amd64.
16.19 Preparing to unpack …/22-libstdc+±9-dev_9.4.0-1ubuntu1~20.04.2_amd64.deb …
16.19 Unpacking libstdc+±9-dev:amd64 (9.4.0-1ubuntu1~20.04.2) …
16.48 Selecting previously unselected package g+±9.
16.49 Preparing to unpack …/23-g+±9_9.4.0-1ubuntu1~20.04.2_amd64.deb …
16.49 Unpacking g+±9 (9.4.0-1ubuntu1~20.04.2) …
17.47 Selecting previously unselected package g++.
17.47 Preparing to unpack …/24-g++_4%3a9.3.0-1ubuntu2_amd64.deb …
17.48 Unpacking g++ (4:9.3.0-1ubuntu2) …
17.50 Selecting previously unselected package build-essential.
17.50 Preparing to unpack …/25-build-essential_12.8ubuntu1.1_amd64.deb …
17.50 Unpacking build-essential (12.8ubuntu1.1) …
17.53 Selecting previously unselected package dctrl-tools.
17.53 Preparing to unpack …/26-dctrl-tools_2.24-3_amd64.deb …
17.54 Unpacking dctrl-tools (2.24-3) …
17.58 Selecting previously unselected package dkms.
17.58 Preparing to unpack …/27-dkms_2.8.1-5ubuntu2_all.deb …
17.59 Unpacking dkms (2.8.1-5ubuntu2) …
17.63 Selecting previously unselected package sudo.
17.63 Preparing to unpack …/28-sudo_1.8.31-1ubuntu1.5_amd64.deb …
17.63 Unpacking sudo (1.8.31-1ubuntu1.5) …
17.73 Selecting previously unselected package libfakeroot:amd64.
17.73 Preparing to unpack …/29-libfakeroot_1.24-1_amd64.deb …
17.73 Unpacking libfakeroot:amd64 (1.24-1) …
17.76 Selecting previously unselected package fakeroot.
17.77 Preparing to unpack …/30-fakeroot_1.24-1_amd64.deb …
17.77 Unpacking fakeroot (1.24-1) …
17.80 Selecting previously unselected package libelf-dev:amd64.
17.80 Preparing to unpack …/31-libelf-dev_0.176-1.1ubuntu0.1_amd64.deb …
17.80 Unpacking libelf-dev:amd64 (0.176-1.1ubuntu0.1) …
17.84 Selecting previously unselected package habanalabs-dkms.
17.84 Preparing to unpack …/32-habanalabs-dkms_1.13.0-463_all.deb …
17.84 Unpacking habanalabs-dkms (1.13.0-463) …
18.46 Selecting previously unselected package libalgorithm-diff-perl.
18.47 Preparing to unpack …/33-libalgorithm-diff-perl_1.19.03-2_all.deb …
18.47 Unpacking libalgorithm-diff-perl (1.19.03-2) …
18.50 Selecting previously unselected package libalgorithm-diff-xs-perl.
18.51 Preparing to unpack …/34-libalgorithm-diff-xs-perl_0.04-6_amd64.deb …
18.51 Unpacking libalgorithm-diff-xs-perl (0.04-6) …
18.53 Selecting previously unselected package libalgorithm-merge-perl.
18.54 Preparing to unpack …/35-libalgorithm-merge-perl_0.08-3_all.deb …
18.54 Unpacking libalgorithm-merge-perl (0.08-3) …
18.59 Setting up libalgorithm-diff-perl (1.19.03-2) …
18.59 Setting up binutils (2.34-6ubuntu1.9) …
18.59 Setting up kmod (27-1ubuntu2.1) …
18.63 Setting up libgomp1:amd64 (10.5.0-1ubuntu1~20.04) …
18.63 Setting up libfakeroot:amd64 (1.24-1) …
18.64 Setting up fakeroot (1.24-1) …
18.64 update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
18.64 update-alternatives: warning: skip creation of /usr/share/man/man1/fakeroot.1.gz because associated file /usr/share/man/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn’t exist
18.64 update-alternatives: warning: skip creation of /usr/share/man/man1/faked.1.gz because associated file /usr/share/man/man1/faked-sysv.1.gz (of link group fakeroot) doesn’t exist
18.64 update-alternatives: warning: skip creation of /usr/share/man/es/man1/fakeroot.1.gz because associated file /usr/share/man/es/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn’t exist
18.64 update-alternatives: warning: skip creation of /usr/share/man/es/man1/faked.1.gz because associated file /usr/share/man/es/man1/faked-sysv.1.gz (of link group fakeroot) doesn’t exist
18.64 update-alternatives: warning: skip creation of /usr/share/man/fr/man1/fakeroot.1.gz because associated file /usr/share/man/fr/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn’t exist
18.64 update-alternatives: warning: skip creation of /usr/share/man/fr/man1/faked.1.gz because associated file /usr/share/man/fr/man1/faked-sysv.1.gz (of link group fakeroot) doesn’t exist
18.64 update-alternatives: warning: skip creation of /usr/share/man/sv/man1/fakeroot.1.gz because associated file /usr/share/man/sv/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn’t exist
18.64 update-alternatives: warning: skip creation of /usr/share/man/sv/man1/faked.1.gz because associated file /usr/share/man/sv/man1/faked-sysv.1.gz (of link group fakeroot) doesn’t exist
18.65 Setting up make (4.2.1-1.2) …
18.65 Setting up libmpfr6:amd64 (4.0.2-1) …
18.66 Setting up libmpc3:amd64 (1.1.0-1) …
18.66 Setting up libatomic1:amd64 (10.5.0-1ubuntu1~20.04) …
18.66 Setting up patch (2.7.6-6) …
18.66 Setting up libelf-dev:amd64 (0.176-1.1ubuntu0.1) …
18.66 Setting up sudo (1.8.31-1ubuntu1.5) …
18.68 Setting up libubsan1:amd64 (10.5.0-1ubuntu1~20.04) …
18.68 Setting up libisl22:amd64 (0.22.1-1) …
18.68 Setting up libalgorithm-diff-xs-perl (0.04-6) …
18.69 Setting up libcc1-0:amd64 (10.5.0-1ubuntu1~20.04) …
18.69 Setting up liblsan0:amd64 (10.5.0-1ubuntu1~20.04) …
18.69 Setting up dctrl-tools (2.24-3) …
18.70 Setting up libitm1:amd64 (10.5.0-1ubuntu1~20.04) …
18.71 Setting up gcc-9-base:amd64 (9.4.0-1ubuntu1~20.04.2) …
18.71 Setting up libalgorithm-merge-perl (0.08-3) …
18.71 Setting up libtsan0:amd64 (10.5.0-1ubuntu1~20.04) …
18.71 Setting up dpkg-dev (1.19.7ubuntu3.2) …
18.72 Setting up libasan5:amd64 (9.4.0-1ubuntu1~20.04.2) …
18.72 Setting up cpp-9 (9.4.0-1ubuntu1~20.04.2) …
18.72 Setting up libgcc-9-dev:amd64 (9.4.0-1ubuntu1~20.04.2) …
18.72 Setting up cpp (4:9.3.0-1ubuntu2) …
18.73 Setting up gcc-9 (9.4.0-1ubuntu1~20.04.2) …
18.73 Setting up libstdc+±9-dev:amd64 (9.4.0-1ubuntu1~20.04.2) …
18.73 Setting up gcc (4:9.3.0-1ubuntu2) …
18.75 Setting up dkms (2.8.1-5ubuntu2) …
18.78 Setting up habanalabs-dkms (1.13.0-463) …
18.79 Adding Module to DKMS build system habanalabs-dkms 1.13.0-463
18.99 Doing initial module build habanalabs-dkms 1.13.0-463
62.25 Installing initial module habanalabs-dkms 1.13.0-463
62.81 Failed to send reload request: No such file or directory
62.81 dpkg: error processing package habanalabs-dkms (–configure):
62.81 installed habanalabs-dkms package post-installation script subprocess returned error exit status 1
62.81 Setting up g+±9 (9.4.0-1ubuntu1~20.04.2) …
62.82 Setting up g++ (4:9.3.0-1ubuntu2) …
62.86 update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
62.86 update-alternatives: warning: skip creation of /usr/share/man/man1/c++.1.gz because associated file /usr/share/man/man1/g++.1.gz (of link group c++) doesn’t exist
62.86 Setting up build-essential (12.8ubuntu1.1) …
62.86 Processing triggers for systemd (245.4-4ubuntu3.22) …
62.87 Processing triggers for libc-bin (2.31-0ubuntu9.9) …
62.91 Errors were encountered while processing:
62.91 habanalabs-dkms
62.95 E: Sub-process /usr/bin/dpkg returned an error code (1)


Dockerfile:71

69 | apt-get install -y binutils-x86-64-linux-gnu &&
70 | apt-get -y install linux-headers-5.15.0-60-generic udev
71 | >>> RUN apt install -y habanalabs-dkms
72 | RUN modprobe -r habanalabs habanalabs_cn habanalabs_en
73 | RUN modprobe habanalabs_en habanalabs_cn habanalabs

ERROR: failed to solve: process “/bin/bash -c apt install -y habanalabs-dkms” did not complete successfully: exit code: 100