1. Moved description label to docker-bake.hcl. Image descriptions must be specified here. See: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#adding-a-description-to-multi-arch-images 2. Moved specifying the 'Dockerfile' to 'common'. 3. Changed it so the gpu-fs and gcn-fpu images only built to linux/amd64. arm64 doesn't work.
rocm-build Dockerfile
The Dockerfile in this directory is used to build applications to be run with GPU full system. Applications targeting AMD's ROCm GPU framework can be built using this docker (e.g., HIP, HSA, OpenCL, etc.). The current major ROCm version targeted is 6.1. This version matches the disk image provided in gem5-resources.
The purpose of this docker image is to allow building applications without requiring ROCm to be installed on the host machine. If you have ROCm installed locally and the version matches the disk image of the simulated system, this docker is not required and you may build on the host normally. This docker is also not the disk image used to simulated GPU full system applications (i.e., not an input to gem5 itself).
Building the docker image
docker build -t <image_name> .
For example:
docker build -t rocm6-build .
Building an application
Building an application requires that docker run in a directory which has access to all files needed to build.
The simplest example would be square in the gem5-resources repository.
Square provides a Makefile and has only one input file:
cd gem5-resources/src/gpu/square
docker run --rm -u $UID:$GID -v $PWD:$PWD -w $PWD rocm6-build make
More complex applications, such as applications requiring m5ops, applications with multiple build steps, or paths with symlinks require more complex --volume command line options. See the docker documentation to figure out how to set the volumes to build your application.