Skip to content

Notnaton/amdgpu-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal ROCm Docker Container

A lightweight Docker container for testing AMD GPU access with ROCm.

Features

  • Minimal Arch Linux-based container
  • Non-root user with proper GPU access
  • Automatic permission fixing on startup
  • Simple verification of GPU accessibility with rocminfo

Requirements

  • Docker and Docker Compose
  • AMD GPU with ROCm support
  • Linux host with proper GPU drivers installed

Quick Start

  1. Build and start the container:

    sudo docker compose up --build -d
  2. Enter the container:

    sudo docker exec -it amdgpu-docker-rocm-test-1 bash
  3. Verify GPU access:

    rocminfo

Files

  • Dockerfile: Minimal container definition
  • docker-compose.yml: Container orchestration
  • fix-gpu-permissions.sh: Script to set proper device permissions (automatically created in the container)

Troubleshooting

If you encounter permission issues:

  1. Ensure your user is in the video and render groups on the host
  2. Check that the RENDER_GID in docker-compose.yml matches your host's render group ID
  3. Verify that /dev/kfd and /dev/dri/* devices exist and are accessible

How It Works

This minimal container:

  1. Creates a non-root user with video and render group access
  2. Sets up a script to fix GPU device permissions
  3. Runs the permission script automatically when you log in
  4. Provides a simple environment for testing GPU access

Comparison to Full Container

This minimal container is designed specifically for testing GPU access, while the main container provides a complete development environment. Use this container when you need to:

  • Quickly verify GPU accessibility
  • Troubleshoot permission issues
  • Test basic ROCm functionality
  • Create a minimal base for specialized containers

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks