Selenium Grid in Docker - Chrome with GPU acceleration using VirtualGL?

165 views
Skip to first unread message

Jordan Sim

unread,
Nov 10, 2022, 10:42:08 PM11/10/22
to Selenium Users
Has anyone managed to get Chrome hardware acceleration working on Docker? I came across this thread but it's quite old. 

I've made my own VirtualGL Dockerfile to use as a base for node-chrome images, but it doesn't work - Chrome crashes before it can run a test.

FROM nvidia/cuda:11.6.0-runtime-ubuntu18.04

#Install virtualGL

ENV VIRTUALGL_VERSION 3.0.2
RUN apt-get update && apt-get install -y \
    libglu1-mesa-dev mesa-utils wget xterm libgl1-mesa-glx libegl1-mesa  && \
    rm -rf /var/lib/apt/lists/*

RUN wget http://downloads.sourceforge.net/project/virtualgl/${VIRTUALGL_VERSION}/virtualgl_${VIRTUALGL_VERSION}_amd64.deb && \
    dpkg -i virtualgl*_amd64.deb  &&\
    /opt/VirtualGL/bin/vglserver_config -config +s +f -t && \
    rm virtualgl*_amd64.deb
   
ENV GEOPROBE_USEGLX=1 \
    LD_PRELOAD=libdlfaker.so:libvglfaker.so \
    PROMAGIC_USEGLX=1 \
    VBOX_CROGL_FORCE_SUPPORTED=1 \
    VGL_ISACTIVE=1 \  
    _=/usr/bin/vglrun \
    VGL_PROFILE=1

CMD bash

Reply all
Reply to author
Forward
0 new messages