Commit Graph

21 Commits

Author SHA1 Message Date
Bobby R. Bruce
9f93c8ac9c util-docker: Revert docker image tag to 'latest'
Change-Id: Iafe92716725e6b3cecfeba57098c3a7efaf73d97
2024-08-13 16:13:33 -07:00
Bobby R. Bruce
59455daa85 util-docker: Fix correct common platform comment
Change-Id: Ifc703b47b1e59522ba01f4c2b59a4863779eefb1
2024-08-13 16:12:45 -07:00
Bobby R. Bruce
58aad68329 util-docker: Order targets in docker-bake
This improves readbility. The targets order matches that in the default
group.

Change-Id: I1102aeb48bc256df9b58032a327ec663e5733a98
2024-08-13 16:08:03 -07:00
Bobby R. Bruce
9978b4ea4c util-docker: Add 'devcontainer' to default bake group
Change-Id: I4b245cabd6e384cab780bd22b0f8b40d9819b92b
2024-08-13 16:07:22 -07:00
Bobby R. Bruce
4956c475f4 util-docker: Set the GPU Docker images to build only to x86
These images won't work and make no sense compiling to any platform
other than X86. These are used in SE mode simulations where the host
platform matters.

Change-Id: I47405e930bf511fabcbc93d0b08ee2fb2c556869
2024-08-13 16:07:22 -07:00
Bobby R. Bruce
c1a562083d util-docker: Set 'pull' to 'always'
This ensures the a `docker pull` command is always run before building.

Change-Id: If1a66b9b426d5843459e0308a64f13a11c0c6ed2
2024-08-13 16:07:21 -07:00
Bobby R. Bruce
9d635dea55 util-docker: Improve Docker gcc and clang builder
1. Uses the all-dependencies image as the base image.
2. Has all compilers use Ubuntu 24.04.

Notes: This change implitly changes our supported compilers to GCC v10
to v13 and Clang v14 to v18. This will be fully incorporated into the
project later.

Change-Id: Id8e2141ea64a34c7e3532605f6ecb7d9ccb76951
2024-08-13 16:07:15 -07:00
Bobby R. Bruce
a1eefb6ed8 util-docker: Remove old/unsed/unecessary Dockerfiles
* Unsupported compilers.
* Unsed cross compilers.
* The gem5-all-min-deps image.

Change-Id: Iaab64e5e6685b0a538c38b2979fae86f01bc53e8
2024-08-13 16:05:47 -07:00
Bobby R. Bruce
e03a20bdb4 util-docker: Remove version from systemc Docker context
This simplifies things slightly.

Change-Id: I1263e385f7adeb2b83cdc09f7f6903be9193c467
2024-08-13 16:05:47 -07:00
Bobby R. Bruce
c291678881 util-docker: Fix docker-bake.hcl sst context
The context for sst is the "sst" directory.

Change-Id: Ic120cca13a9e4df02b98d101ad8e16c296807c2d
2024-08-13 16:05:47 -07:00
Bobby R. Bruce
e82e824f08 util-docker: Breakup long (>79 char) lines in docker-bake
Change-Id: I5488301543bfff21279b6c0b1aae841574efee95
2024-08-13 16:05:46 -07:00
Bobby R. Bruce
eabb625870 util-docker,tests: Up clang support: >=v10
The compiler tests are failing to to a compile bug in Clang 7:
https://github.com/gem5/gem5/actions/runs/10170081794

Given Ubuntu 20.04 APT installs v10 by default (i.e., with `apt install
clang`). This is the oldest LTS Ubuntu version. It therefore seems
sensible to drop support for older (<v10) versions of clang.

Change-Id: I4c48223b80306422beac1464c09f03397c156ba1
2024-08-07 00:35:34 -07:00
Jason Lowe-Power
5961b0ba76 misc: Change devcontainer for isca tutorial
Change-Id: I4e946bf32b5ad362ff34de5d354fe29cd26fc0cb
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2024-08-02 09:20:53 -07:00
Bobby R. Bruce
ccd9beb661 util-docker: Remove 22.04 min-dep Dockerfile
We only test the latest LTS Ubuntu release with min-deps. With 24.04, we
no longer require the 22.04 min dependencies image.

Change-Id: I4b3d668c1f9d10c2b6071848e6daada6c763b5e7
2024-04-13 14:16:41 -07:00
Bobby R. Bruce
d091c64db1 util-docker: Add Ubuntu 24.04 min-dep Docker
Change-Id: Ia5cb4f2fd54ce53494ab95705b4f6006648d7eba
2024-04-13 14:08:13 -07:00
Bobby R. Bruce
3962fca2e3 util-docker: Add ubuntu-24.04_all-deps Docker
Change-Id: I5917c446cacc25d1a333b5cf8147ee78b112aeb3
2024-04-13 14:08:13 -07:00
Bobby R. Bruce
392a2b4ffa misc: Add a DevContainer specification to the gem5 repo (#911)
Speciftying a DevContainer in gem5 allows for users to quickly create an
environment in which they can develop, build, and run gem5. The
".devcontainer/devcontainer.json" file specifies the properties of the
container. In this commit they are as follows:

1. The Docker image ghcr.io/gem5/devcontainer. This is built from
"util/dockerfiles/devcontainer". This Dockerfile provides all
dependencies and a pre-built gem5 binary from the current main branch
(added to "/usr/local/bin"). In order to support this Docker container
on different platforms we use the Docker multi-platform feature. As
such, this must be built using `docker buildx bake devcontainer --push`
which reads the `docker-bake.hcl file for the specification of the
multi-platform image.
2. Visual Studio extensions. This is a list of Visual Studio Code
extensions useful when developing gem5. They are automatically added the
Visual Studio dev container.
3. Features. Features are enhancemets that can be added to a
DevContainer. Normally they are libraries and other commonly used tools
to be included in the Container. As we have our dependencies specified
in the Dockerfile here we select one to enable Docker inside the
container, one to enable the Github CLI, one to improve Linting, and
finally one to enable the vscode CLI.
4. The On Create Command : This command allows us to specify commands to
be run after the DevContainer is created. In this case we execute
".devcontainer/on-create.sh" which, right now, refreshes the git index
and installed the pre-commit checks.
2024-04-12 10:37:17 -07:00
Bobby R. Bruce
cfef2ac23b util-docker: Fix end-of-line error in docker-bake.hcl
Change-Id: I2c792f35d8c74e29cf0dc0bc1287b6b5f3e4d6c8
2023-10-16 12:06:01 -07:00
Ivana Mitrovic
cb078f14c6 docker-bake: Changed compilers names to be more descriptive 2023-10-16 11:53:45 -07:00
Ivana Mitrovic
5b721b033f docker-bake: modified .hcl file
Migrated all the image build definitions from docker-compose.yaml to the bake file.
2023-10-16 11:47:49 -07:00
Bobby R. Bruce
1b0bb678ab util-docker: Proof-of-concept using Docker buildx
Introduced in https://github.com/gem5/gem5/pull/236 the
"docker-build.yaml" file will allow us to build and push docker images
to the GitHub Container Registry. This allows for both automation of
docker image building and allows us to utilize Github's zero-cost
pulling policy for downloads to GitHub Actions runners.

In this PR https://github.com/gem5/gem5/pull/236 has been altered to
use Docker `buildx` which allows for multi-platform Docker Image builds.
A multi-platform Docker image pull automatically pull the correct image
for your platform from a single URL. In this prototype the images are
build to both `linux/arm64` and `linux/amd64` have been set.

Docker `buildx` has it's own file format for specifying image builds
called `bake`. "util/dockerfiles/docker-bake.hcl" has been added with
the goal of replacing "util/dockerfiles/docker-compose.yaml".

In this proof-of-concept doesn't build all our docker images, just
enough to ensure it works inside our actions as intended.

Change-Id: Id0debed216c91ec514aa4fce3bc2ff4fc2ea669b
2023-09-05 17:59:06 -07:00