Jump to content

Nvidia Runtime Docker Compose


ShadowKindjal
Go to solution Solved by ShadowKindjal,

Recommended Posts

ShadowKindjal

Would anyone be able to help me? I have a docker install for Emby currently working but I would like to use Docker Compose to further simplify the process. I noticed that the Nvidia runtime is not supported within the docker-compose.yml file but does anyone know a way to maybe incorporate the runtime with a Dockerfile? Any help would be appreciated. 

Link to comment
Share on other sites

ShadowKindjal

This snippet is my current run command for my server that is currently working. 

docker run -d --name emby --volume /opt/emby/config:/config --volume /opt/emby/SSL:/SSL --volume /mnt/data/Backup/Emby:/backup --volume /mnt/data/Movies:/mnt/data/Movies --volume /mnt/data/Shows:/mnt/data/TV\ Shows --volume /mnt/data/Anime:/mnt/data/Anime --device /dev/dri:/dev/dri --runtime=nvidia --publish 8096:8096 --publish 8920:8920 --env GIDLIST=44,109 --restart unless-stopped emby/embyserver:latest

This snippet is the docker-compose config that I'm attempting to set up. I know that docker-compose doesn't support the NVIDIA runtime but I was wondering if there's a way to get it working with a Dockerfile. This compose script works as long as I don't specify the "--runtime=nvidia"

version: "2.1"
services:
  emby:
    image: emby/embyserver:latest
    container_name: emby
    environment:
      - GIDLIST=44,109
    volumes:
      - /opt/emby/config:/config
      - /opt/emby/SSL:/SSL
      - /mnt/data/Backup/Emby:/backup
      - /mnt/data/Movies:/mnt/data/Movies
      - /mnt/data/Shows:/mnt/data/TV Shows
	  - /mnt/data/Anime:/mnt/data/Anime
    ports:
      - 8096:8096
      - 8920:8920
    devices:
      - /dev/dri:/dev/dri
    restart: unless-stopped

 


 

Edited by ShadowKindjal
Link to comment
Share on other sites

mastrmind11

nope.  i dont use compose files.  You sure its vanilla /dev/dri?  

Link to comment
Share on other sites

  • 4 weeks later...
  • 5 months later...
  • Solution
ShadowKindjal
20 minutes ago, Luke said:

The Emby Server Docker now has a Compose, and instructions have been added to our website:

https://emby.media/docker-server.html

If interested please try it out and report your experience. Thanks !

Thank you for the update Luke. I actually managed to get my docker compose implementation to work a few months ago and I apologize for not responding back with an update. The code below is a snippet of from my docker-compose.yml file that I am using (if anyone is looking for an example of a working configuration). As I previously stated, my main issue was exposing the Nvidia GPU for use within docker compose and I was able solve this by using the nvidia runtime (which is specified in the docker overview for emby) and the NVIDIA_VISIBLE_DEVICES=all environment. Without the last command by GPU wasn't available to Emby to be used.

  emby:
    image: emby/embyserver:latest
    container_name: emby
    runtime: nvidia
    environment:
      - PUID=1001
      - PGID=133
      - NVIDIA_VISIBLE_DEVICES=all
    volumes:
      - /opt/emby/config:/config
      - /opt/emby/SSL:/SSL
      - /mnt/data/Backup/Emby:/backup
      - /mnt/data/Movies:/Movies
      - /mnt/data/Shows:/Shows
      - /mnt/data/Anime:/Anime
    ports:
      - 8096:8096
      - 8920:8920
    restart: unless-stopped

 

Link to comment
Share on other sites

9 hours ago, ShadowKindjal said:

Thank you for the update Luke. I actually managed to get my docker compose implementation to work a few months ago and I apologize for not responding back with an update. The code below is a snippet of from my docker-compose.yml file that I am using (if anyone is looking for an example of a working configuration). As I previously stated, my main issue was exposing the Nvidia GPU for use within docker compose and I was able solve this by using the nvidia runtime (which is specified in the docker overview for emby) and the NVIDIA_VISIBLE_DEVICES=all environment. Without the last command by GPU wasn't available to Emby to be used.


  emby:
    image: emby/embyserver:latest
    container_name: emby
    runtime: nvidia
    environment:
      - PUID=1001
      - PGID=133
      - NVIDIA_VISIBLE_DEVICES=all
    volumes:
      - /opt/emby/config:/config
      - /opt/emby/SSL:/SSL
      - /mnt/data/Backup/Emby:/backup
      - /mnt/data/Movies:/Movies
      - /mnt/data/Shows:/Shows
      - /mnt/data/Anime:/Anime
    ports:
      - 8096:8096
      - 8920:8920
    restart: unless-stopped

 

Thanks for the feedback.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...