Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Unable tu use EGL example #1751

Closed
6 tasks done
mwestphal opened this issue May 1, 2023 · 2 comments
Closed
6 tasks done

Unable tu use EGL example #1751

mwestphal opened this issue May 1, 2023 · 2 comments

Comments

@mwestphal
Copy link

1. Issue or feature description

Reading the doc in nvidia/opengl: https://hub.docker.com/r/nvidia/opengl, there is a link to outdated examples her: https://gitlab.com/nvidia/container-images/samples/-/tree/master/opengl

I've been trying to use the peglgears, which I adapted for the nvidia/opengl:1.2-glvnd-devel-ubuntu20.04 image with the following dockerfile:

# peglgears from Mesa demos
# ftp://ftp.freedesktop.org/pub/mesa/demos/8.3.0/

# docker build -t peglgears .
# docker run --runtime=nvidia -ti --rm peglgears

FROM nvidia/opengl:1.2-glvnd-devel-ubuntu20.04

ENV NVIDIA_REQUIRE_DRIVER "driver>=390"

RUN apt-get update && apt-get install -y --no-install-recommends \
        ca-certificates \
        curl \
        g++ \
        libglew-dev \
        freeglut3-dev \
        make && \
    rm -rf /var/lib/apt/lists/*

RUN curl -fsSL https://mesa.freedesktop.org/archive/demos/8.3.0/mesa-demos-8.3.0.tar.gz -O && \
    tar -xzf mesa-demos-8.3.0.tar.gz -C /opt && \
    rm mesa-demos-8.3.0.tar.gz && \
    cd /opt/mesa-demos-8.3.0 && \
    ./configure --enable-egl=yes && \
    make -j"$(nproc)"

CMD /opt/mesa-demos-8.3.0/src/egl/opengl/peglgears
               

However it fails with:

docker run -it eacffccba556
peglgears: eglInitialize failed

2. Steps to reproduce the issue

3. Information to attach (optional if deemed irrelevant)

  • Kernel version from uname -a: Linux arch 6.1.26-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 26 Apr 2023 19:15:42 +0000 x86_64 GNU/Linux
  • Any relevant kernel output lines from dmesg: none
  • Driver information from nvidia-smi -a: Driver Version: 530.41.03 but it dont see how it is relevant
  • Docker version from docker version: 23.0.4
  • NVIDIA packages version from dpkg -l '*nvidia*' or rpm -qa '*nvidia*': not using dpkg or rpm
  • Docker command, image and tag used

Ideally I want to be able to use the nvidia libegl inside a docker container without any constraints.

@elezar
Copy link
Member

elezar commented May 2, 2023

@mwestphal which version of the NVIDIA Container Toolkit are you running? The NVIDIA Container Toolkit (through the NVIDIA Container Runtime) injects the required driver libraries and devices into the container as it is starting allowing applications that require GPU access to function in a contianer.

@mwestphal
Copy link
Author

HI @elezar

I'm not using NVIDIA Container Toolkit. I was hoping to make this work in a vanilla docker without a GPU at all, turns out this is not possible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants