Ctrl K
ComunidadGuías…

docker-compose.amd.yml

Rama dev · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# NoMercy MediaServer - Docker Compose (AMD GPU)
# 
# Complete standalone configuration with AMD VAAPI hardware acceleration.
# Requires: AMD GPU with VCE/VCN support (GCN 2.0+ / RDNA).
#
# Usage:
#   docker compose -f docker-compose.amd.yml up -d
#   docker compose -f docker-compose.amd.yml logs -f nomercy
#   docker compose -f docker-compose.amd.yml down
#
# Prerequisites:
#   1. AMD GPU with hardware encoding support
#   2. AMDGPU kernel driver (usually included in kernel 4.15+)
#
# Verify GPU:
#   ls -la /dev/dri/
#   vainfo (install vainfo package)

services:
  nomercy:
    container_name: nomercy-mediaserver
    image: ghcr.io/nomercy-entertainment/nomercymediaserver:amd
    # To build locally instead of pulling from registry, uncomment:
    # build:
    #   context: .
    #   dockerfile: Dockerfile.amd
    restart: unless-stopped
    ports:
      - "7626:7626"
    # AMD GPU device passthrough
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
      - /dev/dri/card0:/dev/dri/card0
      # ROCm device (optional, for compute workloads)
      # - /dev/kfd:/dev/kfd
    group_add:
      - video
      - render
    volumes:
      # Configuration and data persistence
      # The app stores all data under $HOME/.local/share/NoMercy/
      - nomercy-data:/data/.local/share/NoMercy
      # Host machine-id (read-only): gives the container a stable, unique server
      # identity that survives `docker compose down/up` and container recreation.
      # Without it, a recreated container registers as a brand-new server.
      - /etc/machine-id:/etc/machine-id:ro
      # Mount your media libraries (adjust paths as needed)
      # rw = read-write for metadata, thumbnails, and transcoding
      - /path/to/your/movies:/media/movies:rw
      - /path/to/your/tv:/media/tv:rw
      - /path/to/your/music:/media/music:rw
    environment:
      - TZ=UTC
      - PUID=1000
      - PGID=1000
      - NOMERCY_INTERNAL_IP=${HOST_IP:?HOST_IP is required. Set it to this host LAN IP, e.g. export HOST_IP=$(hostname -I | awk '{print $1}')}
      # - NOMERCY_EXTERNAL_IP=1.2.3.4         # Public IP (auto-detected via UPnP/API)
      # - NOMERCY_INTERNAL_PORT=7626           # Server port
      # - NOMERCY_EXTERNAL_PORT=7626           # External port (if different from internal)
      # - NOMERCY_LOG_LEVEL=Information        # Verbose, Debug, Information, Warning, Error, Fatal
      # - NOMERCY_DEV=true                     # Development mode
      # AMD VAAPI environment
      - LIBVA_DRIVER_NAME=radeonsi
      - AMD_VULKAN_ICD=RADV
    deploy:
      resources:
        limits:
          memory: 4G
        reservations:
          memory: 512M
    healthcheck:
      test: ["CMD", "curl", "-f", "http://127.0.0.1:7627/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s

volumes:
  nomercy-data:
    name: nomercy-data