-
Notifications
You must be signed in to change notification settings - Fork 100
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
Revamp Dockerfiles #17403
Revamp Dockerfiles #17403
Conversation
graphviz is needed by some test for “dot”
|
||
############################################################# | ||
|
||
FROM ci-test AS dev |
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.
Are we going to trim down the runtime dependencies later after the basis is merged?
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.
yes, I'll file a ticket for that.
############################################################# | ||
|
||
FROM dev AS release | ||
|
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.
There might be an issue with the release images as you merge @afuller-TT 's latest PR. See this line: https://github.com/tenstorrent/tt-metal/pull/17516/files#diff-6e6cd4043a79554fa4a311541ed0418aebae47985936fecc38c5a15ec0adb32bR1
I do not have a good idea of how to support that workflow with the stages outlined.
FROM $BASE_IMAGE as release
?
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.
I don't think we need the build argument anymore.
The release image is now based on an earlier layer, instead of a pushed tag.
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.
We'll be losing out on the efficiency of re-using a previously built stage, unless we have dumb luck on the build machine.
I'm okay with this as a stepping stone. But certainly there's room for improvement. I don't think it's detrimental; just inefficient (compute and storage).
scripts/docker/run_docker_cmd.sh
Outdated
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.
Any idea where this was used? I only see it referenced in egg-info.
dockerfile/Dockerfile
Outdated
jq \ | ||
pandoc \ | ||
pkg-config \ | ||
python3-dev \ |
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.
Aren't some of these hard requirements for building even outside of CI?
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.
I put all build dependencies in ci-build layer.
runtime layer is just for running with precompiled binaries.
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.
I thought the build dependencies went in install_dependencies.sh
? Since we're calling it on line 20 asking for the build dependencies.
So if one adds a new build dependency, does it go here in the Dockerfile? Or in the install_dependencies.sh script?
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.
You raise a really good point.
My thinking was install_dependencies.sh should manage all build dependencies, and this section should be anything we need in CI for our workflows ... for instance, we do some sudo rm in workflows, so that should go here. We need jq for some parsing? add it here.... clang-tidy ... add it here ...
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.
Cargo ... is only needed for tt-train I think ... so I have mixed emotions about it
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.
graphviz is only needed to run some pytests ...
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.
I am not ready to put these in install dependencies as they aren't used as of yet.
libfmt-dev
libyaml-cpp-dev
pybind11-dev
nlohmann-json3-dev
libgtest-dev
libboost-all-dev \
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.
I moved git, pkg-config, and python3-dev to install_dependencies.sh
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.
I like it ❤️
I'll review again after latest main
is merged in.
libtbb-dev \ | ||
libcapstone-dev \ |
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.
these two are TRACY "requirements" ... a customer would never build with tracy? I'm thinking keep them here.
@mo-tenstorrent
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.
Customers definitely build with tracy. This is a tool for anyone developing on our cards. I would keep them in any docker release we have to support profiler builds.
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.
Let's roll!
I know this doesn't USE these slimmed-down Docker images, but we can iterate after this lands.
Problem(s) description
What's changed
Dockerfile
with a base, ci-build, ci-test, dev, release image definitions.ci-build
for build machines, andci-test
for test machines.Possible in future work
It will be possible to make a much smaller release image in future work
However there is work to be done to make sure that the smoke test works with the release image.
Checklist