Uploaded image for project: 'OpenShift Runtimes'
  1. OpenShift Runtimes
  2. RUN-2070

[containers/buildah] CDI spec devices are not valid input to `--device` when invoking the `build` command

XMLWordPrintable

    • 5
    • RUN 251

      [2206118084] Upstream Reporter: Turing Eret
      Upstream issue status: Closed
      Upstream description:

      Issue Description

      I am trying to build an image and part of the image build process requires compilation of CUDA code which requires access to the GPU. Unfortunately, the build command does not seem to allow this.

      Steps to reproduce the issue

      Steps to reproduce the issue

      1. Create a Dockerfile that looks like so:
      FROM ubuntu:latest 
      
      RUN nvidia-smi
      1. Run podman build --security-opt=label=disable --device=nvidia.com/gpu=all .

      Describe the results you received

      The following error message is returned: Error: creating build executor: getting info of source device nvidia.com/gpu=all: stat nvidia.com/gpu=all: no such file or directory

      Describe the results you expected

      I expected it to work

      podman info output

      host:   arch: amd64
        buildahVersion: 1.31.3
        cgroupControllers: []
        cgroupManager: cgroupfs
        cgroupVersion: v1
        conmon:     package: conmon-2.1.8-1.module_el8+712+4cd1bd69.x86_64
          path: /usr/bin/conmon
          version: 'conmon version 2.1.8, commit: 97585789fa36b1cfaf71f2d23b8add1a41f95f50'
        cpuUtilization:     idlePercent: 99.95
          systemPercent: 0.01
          userPercent: 0.04
        cpus: 32
        databaseBackend: boltdb
        distribution:     distribution: '"centos"'
          version: "8"
        eventLogger: file
        freeLocks: 2048
        hostname: apar-simulator
        idMappings:     gidmap:     - container_id: 0
            host_id: 33911
            size: 1
          - container_id: 1
            host_id: 165536
            size: 65536
          uidmap:     - container_id: 0
            host_id: 33911
            size: 1
          - container_id: 1
            host_id: 165536
            size: 65536
        kernel: 4.18.0-492.el8.x86_64
        linkmode: dynamic
        logDriver: k8s-file
        memFree: 159699095552
        memTotal: 201386913792
        networkBackend: cni
        networkBackendInfo:     backend: cni
          dns:       package: podman-plugins-4.6.1-5.module_el8+712+4cd1bd69.x86_64
            path: /usr/libexec/cni/dnsname
            version: |-
              CNI dnsname plugin
              version: 1.3.1
              commit: unknown
          package: containernetworking-plugins-1.3.0-5.module_el8+712+4cd1bd69.x86_64
          path: /usr/libexec/cni
        ociRuntime:     name: runc
          package: runc-1.1.9-1.module_el8+712+4cd1bd69.x86_64
          path: /usr/bin/runc
          version: |-
            runc version 1.1.9
            spec: 1.0.2-dev
            go: go1.20.6
            libseccomp: 2.5.2
        os: linux
        pasta:     executable: ""
          package: ""
          version: ""
        remoteSocket:     path: /run/user/33911/podman/podman.sock
        security:     apparmorEnabled: false
          capabilities: CAP_NET_RAW,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
          rootless: true
          seccompEnabled: true
          seccompProfilePath: /usr/share/containers/seccomp.json
          selinuxEnabled: true
        serviceIsRemote: false
        slirp4netns:     executable: /usr/bin/slirp4netns
          package: slirp4netns-1.2.2-1.module_el8+712+4cd1bd69.x86_64
          version: |-
            slirp4netns version 1.2.2
            commit: 0ee2d87523e906518d34a6b423271e4826f71faf
            libslirp: 4.4.0
            SLIRP_CONFIG_VERSION_MAX: 3
            libseccomp: 2.5.2
        swapFree: 4294963200
        swapTotal: 4294963200
        uptime: 315h 12m 16.00s (Approximately 13.12 days)
      plugins:   authorization: null
        log:   - k8s-file
        - none
        - passthrough
        - journald
        network:   - bridge
        - macvlan
        - ipvlan
        volume:   - local
      registries:   search:   - registry.access.redhat.com
        - registry.redhat.io
        - docker.io
      store:   configFile: /home/turingeret/.config/containers/storage.conf
        containerStore:     number: 0
          paused: 0
          running: 0
          stopped: 0
        graphDriverName: overlay
        graphOptions: {}
        graphRoot: /home/turingeret/.local/share/containers/storage
        graphRootAllocated: 12800095158272
        graphRootUsed: 702740729856
        graphStatus:     Backing Filesystem: xfs
          Native Overlay Diff: "true"
          Supports d_type: "true"
          Using metacopy: "false"
        imageCopyTmpDir: /data/tmp
        imageStore:     number: 8
        runRoot: /run/user/33911/containers
        transientStore: false
        volumePath: /home/turingeret/.local/share/containers/storage/volumes
      version:   APIVersion: 4.6.1
        Built: 1697441325
        BuiltTime: Mon Oct 16 01:28:45 2023
        GitCommit: ""
        GoVersion: go1.20.6
        Os: linux
        OsArch: linux/amd64
        Version: 4.6.1
      

      Podman in a container

      No

      Privileged Or Rootless

      Privileged

      Upstream Latest Release

      No

      Additional environment details

      No response

      Additional information

      No response


      Upstream URL: https://github.com/containers/buildah/issues/5432

            rhn-engineering-nalin Nalin Dahyabhai
            upstream-sync Upstream Sync
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: