-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove GNU Toolchain for RISC-V from Dockerfile #290
Conversation
Image size evolution (the total size shown is accumulative, with respect to the previously listed items)
For the GCC toolchain
|
f4b9dda
to
c090200
Compare
62f12cc
to
6d87fd6
Compare
Using xpack will actually increase the image size, so maybe we should drop this PR in the end. |
The goal here is to utilize scripts for downloading and extracting the toolchain from xpack, similar to those already in use by our CI pipeline. This approach should help in significantly reducing the size of our Docker image. |
Got it. So the following changes would be made
|
Take run #7295920920, for example. It takes over 11 minutes, yet the actual time spent preparing the build environment and launching the build process accounts for only half of this elapsed time. |
c090200
to
9b1b3cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure git
is installed as a prerequisite; otherwise, you will encounter the following error.
> [linux/amd64 base_gcc 5/6] RUN make:
0.108 Makefile:86: No sdl2-config in $PATH. Check SDL2 installation in advance
0.110 /bin/sh: 1: pkg-config: not found
0.180 Check the file build/.config for configured items.
0.224 CC build/map.o
0.299 CC build/utils.o
0.342 git submodule update --init src/softfloat/
0.351 make: git: No such file or directory
0.352 make: *** [Makefile:73: src/softfloat/build/Linux-RISCV-GCC/Makefile] Error 127
6512e88
to
6f02c90
Compare
Added Should Also, since this dockerfile is not for development anymore (unless I misunderstand the intention of removal of the GCC toolchain), should we just copy the elf files in the build folders, and leave other source files, etc. out? |
It's now the same compile time as Image size is now basically 65 MB + size of directories copied in from rv32emu repo |
No, the Docker image should be limited to only the essential components of rv32emu, excluding SDL display and audio, as these can lead to issues in containerized environments. Therefore, just remove the
Yes, exactly. Users can always view the source code through the GitHub website. Only the built ELF files (for both the host and the RISC-V target) are preserved. |
The recent CI record indicates that building and publishing a Docker image to Docker Hub requires 8 minutes. It looks pretty well since we can lower the elapsed time by installing less packages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop unnecessary packages such as SDL2.
6f02c90
to
4814abd
Compare
The dockerfile contains the rv32emu executable and reference emulator, instead of a full-fledged container for development.
4814abd
to
10f9a99
Compare
Updated as requested/discussed. |
Thank @henrybear327 for contributing! |
The Dockerfile contains the executable files and reference emulator, instead of a full-fledged container for development.
An experiment of using
xpack
as the GCC toolchain instead of our self-compiled docker image.#286