Skip to content

StarGate01/AiDungeon2-Docker-ROCm

Repository files navigation

AiDungeon2-Docker-ROCm

Runs an AIDungeon2 fork in Docker on AMD ROCm hardware.

The Clover-Edition fork of AIDungeon2 and the KoboldAI project use PyTorch, which supports AMD ROCm capable GPUs in addition to the more widely used Nvidia CUDA GPUs.

This project builds a Docker container based on rocm/pytorch, containing everything to play the game on an AMD GPU - tested using a Vega 56 card. Using the 16-bit model, response times are down to a few seconds at most, compared to half a minute or more on CPU-only runs. The 8GB VRAM is more than enough to support the 16-bit model. This image uses a fork (finetuneanon/transformers) of the Huggingface transformers, which enables GPT-Neo to run in 8GB of VRAM.

Setup

Install Docker and the AMD ROCm kernel module on your host (see https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html).

Run ./build.sh to build the Docker image. The models and saved games will be stored in the persistent-data directory, which is mounted into the Docker container.

Test your installation using ./run.sh /app/test/test.sh. It should output detailed info about your GPU and compute capabilities. It should end like this:

Testing ROCm-CUDA on pyTorch
CUDA(hip) is available:  True
CUDA(hip) device_count:  1
Device name:  Device 687f

Usage

To run the game, execute ./run.sh . by default, this launches an KoboldAI instance.

To monitor the GPU usage on your host, execute watch /opt/rocm/bin/rocm-smi .

About

Runs an AIDungeon2 fork in Docker on AMD ROCm hardware.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published