-
Notifications
You must be signed in to change notification settings - Fork 668
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
Update dockerfiles #771
Update dockerfiles #771
Conversation
The gemmini config file's name is been updated from `configs.scala` to `Configs.scala`
….sh script for setting environment variables
…l necessary steps, still needs to be cleaned up
….sh script for setting environment variables
…l necessary steps, still needs to be cleaned up
…comments for entrypoint.sh
…nfig.yml with new docker image
Looks like this is pretty close to running all of the CI tests. I think we just need to add |
Some other thoughts:
|
Looks like some tests are still failing. I would try to increase the timeout even more. |
Note: We will release the 1st version of this Docker image (with all deps, toolchains, etc) with 1.5.0 to Dockerhub. |
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.
LGTM
@@ -18,6 +18,7 @@ sudo yum install -y centos-release-scl | |||
sudo yum install -y devtoolset-8-make | |||
# install DTC | |||
sudo yum install -y dtc | |||
sudo yum install -y python |
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.
A few lines above there is a python36, python36-pip and python36-devel installation. Is this python installation for an earlier or later version?
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.
It would ideally be for a earlier version. I added this because there was a bug I ran into with ubuntu-req.sh where one of the tests was looking for python2 instead of python3. I don't know a way to test on centos, so I'm not entirely sure if the bug would still occur there, so I added it just in case.
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.
which test was looking for python2?
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.
It was both of the tracegen tests.
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.
LGTM overall.
I had one question about the Python requirement, and I'm also wondering if it might be worth mentioning in the docs section that this docker image only sets up baseline Chipyard (not including FireMarshal, FireSim and Hammer initializations)
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.
Looks great! Mostly I have some nitpicks from the apt-get
section of this page, but those could be fixed in a subsequent PR.
dockerfiles/Dockerfile
Outdated
|
||
# Install dependencies for ubuntu-req.sh | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ |
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.
(sorry for chiming in so late)
Usually, you don't actually want to run apt-get upgrade
on a Docker container. From this page:
Avoid RUN apt-get upgrade and dist-upgrade, as many of the “essential” packages from the parent images cannot upgrade inside an unprivileged container. If a package contained in the parent image is out-of-date, contact its maintainers. If you know there is a particular package, foo, that needs to be updated, use apt-get install -y foo to update automatically.
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.
Thanks for the tip. I was able to remove apt-get upgrade
without any problems.
dockerfiles/Dockerfile
Outdated
# Install dependencies for ubuntu-req.sh | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y \ |
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.
If you add the --no-install-recommends
flag to apt-get install
and conclude the command with rm -rf /var/lib/apt/lists/*
, then you can help to minimize the finished container size.
dockerfiles/Dockerfile
Outdated
RUN git clone https://github.com/ucb-bar/chipyard.git && \ | ||
cd chipyard && \ | ||
git checkout $CHIPYARD_HASH && \ | ||
./scripts/ubuntu-req.sh 1>/dev/null |
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.
Since this runs apt-get ...
internally, you might want to add rm -rf /var/lib/apt/lists/*
at the conclusion. In general though, this page mentions that running apt-get update
from two separate steps (since you run it from within this script, and also from the very first RUN
command) can cause weird issues, since build caching can mean that different apt install
commands are working with different apt
source lists.
Merging (followup PR's can clean it up some more if need be... but this is currently much cleaner than the current approach). |
Type of change: new feature + other enhancement
Impact: other
Release Notes
This adds a dockerfile with a complete chipyard set-up and its corresponding entrypoint script. The updates to the CI dockerfile use a portion of the build stages from the main dockerfile.