# gem5_docker **Repository Path**: koverlu/gem5_docker ## Basic Information - **Project Name**: gem5_docker - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-03-23 - **Last Updated**: 2021-05-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## gem5 in docker ### What is it? This builds a docker image that contains ROCm and gem5. The intended use is to run various benchmarks on the APU model in gem5. The container uses ROCm 1.6.2; This can be overridden when building the docker image. (Only tested 1.6.x, using 1.6.0 will result in a build failure) ### How to build/run? [The dockerhub repo](https://cloud.docker.com/repository/registry-1.docker.io/kroarty/gem5) should contain a prebuilt image From source: ``` docker build [--build-arg rocm_ver=] -t . docker run [--name ] -it [-d] [] ``` If '-d' is specified, the container will run in the background \ If '\' isn't specified, the container will run a bash shell ### Building gem5 in the container To keep filesize down, gem5 is not pre-built. So on the initial run of a container, gem5 needs to be built. When attached to the container: ``` cd /gem5 scons -j$(nproc) build/GCN3_X86/gem5.opt --ignore-style ``` When running the container in the background: `docker exec -w/gem5 scons -j$(nproc) /sim/gem5/build/GCN3_X86/gem5.opt --ignore-style` ### Tests ``` export UID docker-compose -f docker-compose.test.yml [-p ] build docker-compose -f docker-compose.test.yml [-p ] up ``` The first line is needed to allow the container to run in non-root mode To clean up the container used for tests: ``` docker-compose -f docker-compose.test.yml [-p ] down ``` ### Misc * Why ROCm 1.6.2? It's the most recent of ROCm 1.6.x that successfully runs both sets of tests across the machine learning/intelligence branch and the non-machine learning/intelligence branch. * Why does ROCm 1.6.0 fail? It unpacks into a different directory structure than 1.6.1-1.6.4; This can be changed in the dockerfile, line 31. After ${rocm_ver}, add '/debian' and it will build ### ToDo * Check dependencies, if any more are needed or if any can be removed * Allow building with docker-compose