"compute-runtime" image contains >1/2GB of extra packages

Open
#8 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
docker
Domain
devops

Research direction

Start by reproducing the docker run ... dpkg package inventories for docker.io/intel/compute-runtime:latest, then inspect the repository definition that builds the compute-runtime image. Identify why the GCC, C++ standard library, dpkg, CMake, and other marked development packages enter the runtime image. Done means those unnecessary packages move out of the runtime image while the required Intel runtime packages remain and the image is substantially smaller.

Written by the indexing model from the issue text.

Description

Issue

compute-runtime image is too large to act as a reasonable base image for GPU workloads:

$ docker images docker.io/intel/compute-runtime:latest
REPOSITORY                       TAG         IMAGE ID      CREATED      SIZE
docker.io/intel/compute-runtime  latest      e1210a73ef24  3 weeks ago  973 MB

Because it has a lot of things that should go to a separate devel image, instead of them being on compute (+ media) driver runtime image.

Extra content: devel packages

Devel packages on the image:

$ docker run -it --rm docker.io/intel/compute-runtime bash -c "dpkg -l '*-dev' | grep ^ii"
ii  dpkg-dev                          1.22.6ubuntu6.6         all          Debian package development tools
ii  libc6-dev:amd64                   2.39-0ubuntu8.7         amd64        GNU C Library: Development Libraries and Header Files
ii  libcrypt-dev:amd64                1:4.4.36-4build1        amd64        libcrypt development files
ii  libgcc-13-dev:amd64               13.3.0-6ubuntu2~24.04.1 amd64        GCC support library (development files)
ii  libmetee-dev:amd64                6.2.1-1~24.04~ppa1      amd64        Intel(R) ME TEE Library - headers
ii  libstdc++-13-dev:amd64            13.3.0-6ubuntu2~24.04.1 amd64        GNU Standard C++ Library v3 (development files)
ii  libze-dev:amd64                   1.28.2-1~24.04~ppa1     amd64        oneAPI Level Zero -- development files
ii  linux-libc-dev:amd64              6.8.0-124.124           amd64        Linux Kernel Headers for development
ii  systemd-dev                       255.4-1ubuntu8.15       all          systemd development files

Of those, Intel ones are IMHO fairly OK:

  • libze-dev: is explicit intel-gpu-compute metapackage dep, needs to match backend version, is smallish (2MB) & does not bring in anything extra
  • libmetee-dev: is explicit libigsc1 dep, small (1<MB) & does not bring in anything extra

But gcc, dpkg and stdc++ devel package definitely are not OK, see output of:
dpkg -s $(dpkg -l *-dev | awk '/^ii/{print $2}') | grep -e ^Package -e ^Depends -e ^Recommends -e Installed-Size.

Extra content: very large packages

Large packages for extra languages and built tools (at least ones marked with "***"):

$ docker run -it --rm docker.io/intel/compute-runtime awk '/^Package:/{name=$2} /^Installed-Size:/{print $2,name}' /var/lib/dpkg/status | sort -nr
123588 libigdfcl2
97334 libigc2
61333 gcc-13-x86-64-linux-gnu ***
57959 libze-intel-gpu1
55617 intel-opencl-icd
36493 cmake ***
35919 libicu74
33545 g++-13-x86-64-linux-gnu ***
30807 cpp-13-x86-64-linux-gnu ***
29333 libperl5.38t64 ***
21692 git ***
21662 libstdc++-13-dev ***
20418 iso-codes
19159 perl-modules-5.38 ***
18880 xpu-smi
16082 libgcc-13-dev ***
13431 libc6
13112 libc6-dev ***
11744 systemd
11549 binutils-x86-64-linux-gnu
10984 cmake-data ***
10791 libasan8
9024 libpython3.12-stdlib
8902 libtsan2
7927 python3.12-minimal
7913 perl-base ***
7507 linux-libc-dev ***
...
Dominant language
Dockerfile
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intel/containers

All issues in intel/containers

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.