Skip to content

Commit

Permalink
Update docker info
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbyRBruce committed Feb 24, 2023
1 parent a3e0045 commit 4bf8b58
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 218 deletions.
12 changes: 3 additions & 9 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
FROM gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest as source
FROM gcr.io/gem5-test/hpca-23-gem5-build:latest as source

RUN apt -y update && apt -y install git

RUN git clone https://gem5.googlesource.com/public/gem5 /gem5

WORKDIR /gem5
FROM gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest

RUN git checkout 3bb19be083d38249d1e1652184d05b0e6406a660
RUN scons -j`nproc` build/ALL/gem5.fast
RUN apt -y update && apt -y install git

FROM gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest
COPY --from=source /gem5/build/ALL/gem5.fast /usr/local/bin/gem5
20 changes: 9 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
FROM gcr.io/gem5-test/ubuntu-20.04_all-dependencies:v22-0
FROM gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest

# Obtain the build gem5 binaries.
COPY --from=gcr.io/gem5-test/gem5-builder:v22-0 /gem5/build/X86/gem5.fast /usr/local/bin/gem5-x86
COPY --from=gcr.io/gem5-test/gem5-builder:v22-0 /gem5/build/ARM/gem5.fast /usr/local/bin/gem5-arm
COPY --from=gcr.io/gem5-test/gem5-builder:v22-0 /gem5/build/RISCV/gem5.fast /usr/local/bin/gem5-riscv
RUN apt -y update && apt -y install git

# Obtain the cross compilers
RUN mkdir /opt/cross-compiler
RUN git clone https://gem5.googlesource.com/public/gem5 /gem5

WORKDIR /gem5

RUN git checkout 3bb19be083d38249d1e1652184d05b0e6406a660

RUN scons -j`nproc` build/ALL/gem5.fast

COPY --from=gcr.io/gem5-test/gnu-cross-compiler-aarch64 /opt/cross-compiler/aarch64-linux /opt/cross-compiler/aarch64-linux
ENV PATH="/opt/cross-compiler/aarch64-linux/bin:${PATH}"

COPY --from=gcr.io/gem5-test/gnu-cross-compiler-riscv64 /opt/cross-compiler/riscv64-linux /opt/cross-compiler/riscv64-linux
ENV PATH="/opt/cross-compiler/riscv64-linux/bin:${PATH}"
13 changes: 0 additions & 13 deletions docker/Dockerfile-builder

This file was deleted.

38 changes: 6 additions & 32 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,15 @@
This directory contains the sources for the gcr.io/gem5-test/gem5-tutorial-env Docker image which is used by [.devcontainer/Dockerfile](/.devcontainer/Dockerfile) to build the Docker container used by Codespaces.
The gcr.io/gem5-test/gem5-tutorial-env Docker image contains:

* All gem5 depenencies (inc. optional dependencies).
* Prebuilt gem5 binaries:
* `/usr/local/bin/gem5-x86`
* `/usr/local/bin/gem5-arm`
* `/usr/local/bin/gem5-riscv`
* A RISCV64 and an AARCH64 GNU Cross-compiler:
* RISCV64 GNU cross-compiler in `/opt/cross-compiler/riscv64-linux/`
* AARCH64 GNU cross-compiler in `/opt/cross-compiler/aarch64-linux/`

This directory provides the source for building the gcr.io/gem5-test/hpca-23-gem5-build image.
This is a base image used in ".devcontainer/Dockerfile" to obtain the a compiled version of gem5.

## Building

gcr.io/gem5-test/gem5-tutorial-env can be built by executing:
gcr.io/gem5-test/hpca-23-gem5-build can be built by executing:

```sh
docker-compose build hpca-23-gem5-build
```
docker-compose build gem5-tutorial-env
```

The gcr.io/gem5-test/gem5-tutorial-env Docker image is built from the [Dockerfile](Dockerfile) file.
It depends on the following images, which are built if not available:

* gcr.io/gem5-test/gem5-builder :
This is built from [Dockerfile-builder](Dockerfile-builder).
It contains prebuilt gem5 binaries.
It is not used directly as it contains the gem5 sources (therefore large).
* gcr.io/gem5-test/gnu-cross-compiler-riscv64 :
This is built from [gnu-cross-compilers/Dockerfile-riscv64](gnu-cross-compilers/Dockerfile-riscv64).
It contains the RISCV64 GNU cross-compiler.
* gcr.io/gem5-test/gnu-cross-compiler-aarch64 :
This is built from [gnu-cross-compilers/Dockerfile-aarch64](gnu-cross-compilers/Dockerfile-aarch64).
It contains the AARCH64 GNU cross-compiler.


## Notes for gem5 developers

## Notes for developers
These images can be pushed with: `docker-compose push`.
Permission must be granted to push to the Google Cloud repository before doing so.

Expand Down
22 changes: 2 additions & 20 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
version: '2'

services:
builder:
build:
context: .
dockerfile: Dockerfile-builder
image: gcr.io/gem5-test/gem5-builder:v22-0
gnu-cross-compiler-riscv64:
build:
context: gnu-cross-compilers
dockerfile: Dockerfile-riscv64
image: gcr.io/gem5-test/gnu-cross-compiler-riscv64
gnu-cross-compiler-aarch64:
build:
context: gnu-cross-compilers
dockerfile: Dockerfile-aarch64
image: gcr.io/gem5-test/gnu-cross-compiler-aarch64
gem5-tutorial-env:
hpca-23-gem5-build:
build:
context: .
dockerfile: Dockerfile
image: gcr.io/gem5-test/gem5-tutorial-env:latest
depends_on:
- builder
- gnu-cross-compiler-riscv64
- gnu-cross-compiler-aarch64

13 changes: 0 additions & 13 deletions docker/gnu-cross-compilers/Dockerfile-aarch64

This file was deleted.

13 changes: 0 additions & 13 deletions docker/gnu-cross-compilers/Dockerfile-riscv64

This file was deleted.

107 changes: 0 additions & 107 deletions docker/gnu-cross-compilers/cross-compiler-build.sh

This file was deleted.

0 comments on commit 4bf8b58

Please sign in to comment.