Skip to content
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

Building inside docker container #293

Merged
merged 28 commits into from
Aug 8, 2024
Merged

Building inside docker container #293

merged 28 commits into from
Aug 8, 2024

Conversation

vmilosevic
Copy link
Contributor

@vmilosevic vmilosevic commented Aug 5, 2024

Adding

  • Dockerfile
  • workflow for building docker image
  • project build using docker image

The Dockerfile describes how to create an image for building the tt-mlir project file. It starts with a supported base image (Ubuntu 20.04) and installs the necessary packages. The purpose of the Docker build is to:

  • Define and install build dependencies
  • Prepare the toolchain

During the Docker build, the project is built and tests are run to ensure that everything is set up correctly. If any dependencies are missing, the Docker build will fail.

This process also prepopulates caches for Python packages and the ccache cache in the image, which should make subsequent builds faster.

Closes: #273

@vmilosevic vmilosevic changed the title [Draft] Building inside docker container Building inside docker container Aug 6, 2024
@vmilosevic vmilosevic requested a review from tapspatel August 6, 2024 15:33
@vmilosevic vmilosevic marked this pull request as ready for review August 6, 2024 15:33
@vmilosevic vmilosevic requested a review from nsmithtt as a code owner August 6, 2024 15:33
@vmilosevic
Copy link
Contributor Author

Maybe we can go with docker and non-docker builds in parallel for a while until we see it is stable. Also, we need non docker build if we want to verify build on mac-os
I was seeing some linter errors so I set them to "continue-on-error" but we should check whats going on before merging

@nsmithtt
Copy link
Contributor

nsmithtt commented Aug 7, 2024

@vmilosevic, thanks this looks awesome!

Maybe we can go with docker and non-docker builds in parallel for a while until we see it is stable. Also, we need non docker build if we want to verify build on mac-os I was seeing some linter errors so I set them to "continue-on-error" but we should check whats going on before merging

@vmilosevic, I'm OK with replacing our bare-metal ubuntu build with the docker version. We can keep the Mac build as is.

@vmilosevic, don't hate me, but I think we need to upgrade to ubuntu 22.04 asap. I pinged you in the tt-mlir-ci channel with more info, but we need to upgrade metal to unblock compiler development and we need ubuntu 22.04 to upgrade metal. I know this seems counter to what metal docs/CI says, more details in slack if you're interested.

With this in mind, maybe we want to just hold off and push our first docker container with metal upgrade all at once? That way folks can adopt the new docker workflow along with new metal all at once.

@tapspatel
Copy link
Contributor

looks awesome!

Copy link
Contributor

@nsmithtt nsmithtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick turnaround on 22.04, this looks great!

.github/Dockerfile Outdated Show resolved Hide resolved
@vmilosevic vmilosevic merged commit e61ea78 into main Aug 8, 2024
7 checks passed
@vmilosevic vmilosevic deleted the vmilosevic/docker-build branch August 8, 2024 10:59
nsmithtt pushed a commit that referenced this pull request Aug 9, 2024
Building inside a docker container

Adding support for running CI pipelines inside a docker container
Added
- Dockerfile based on Ubuntu 22.04
- Docker installs dependencies and prebuilds toolchain
- Workflow for generating docker image
- Workflow that runs build and tests using the docker container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add docker file to repo
3 participants