Skip to content

[Feature Request] Add igpu support inside docker image #523

@webysther

Description

@webysther

After some further testing, I found that as long as the host system has the proper drivers installed, the current 0.15.1 repository image does not need any further modification.

For context: I run ConvertX on a Debian "Trixie" 13.1 host with the intel-media-va-driver-non-free installed using Docker Compose. I am using an Intel Core i5-10400 CPU with integrated Intel UHD Graphics 630.

My compose.yml file is as follows:

services:
  convertx:
    image: ghcr.io/c4illin/convertx:v0.15.1
    user: 157:1012 # ADDED (optional): Ensure the docker process runs rootless - UID:GID
    group_add: # ADDED (required): Ensure the docker process has permission to access the graphics device
      - 155 # The render group GID on the host
    container_name: convertx
    restart: unless-stopped
    environment:
      - TZ=America/New_York
      - JWT_SECRET=${JWT_SECRET} # will use randomUUID() if unset
      - HTTP_ALLOWED=true # uncomment this if accessing it over a non-https connection
      - ACCOUNT_REGISTRATION=false
      - ALLOW_UNAUTHENTICATED=false
      - AUTO_DELETE_EVERY_N_HOURS=168
      - FFMPEG_ARGS=-hwaccel vaapi # ADDED (required): Enables VAAPI hardware acceleration
      - LIBVA_DRIVER_NAME=iHD # ADDED (required): Informs libva of the intel media driver name
      - HIDE_HISTORY=false
      - LANGUAGE=en
      - UNAUTHENTICATED_USER_SHARING=false
      - MAX_CONVERT_PROCESS=0
    volumes:
      - /mnt/Technology/Containers/convertx/data:/app/data
      - /usr/lib/x86_64-linux-gnu/dri:/usr/lib/x86_64-linux-gnu/dri:ro # ADDED (required): Provides read-only access to the intel media drivers
      - /usr/lib/x86_64-linux-gnu/libigdgmm.so.12:/usr/lib/x86_64-linux-gnu/libigdgmm.so.12:ro # ADDED (required): Provides read-only access to the intel graphics memory management library
    devices: # ADDED (required): Informs container of the graphics device
      - /dev/dri:/dev/dri # The graphics device location mapped from host to container
    networks:
      - convertx_net

networks:
  convertx_net:
    external: true

In a nutshell: I believe that as long as you provider the container proper access to the host's graphics device and drivers, you can easily enable hardware acceleration for an integrated Intel GPU as of 0.15.1.

Originally posted by @thecodygriffin in #190

Add the drivers inside the docker image and futher docs to enable the igpu acceleration will be nice

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions