Skip to content

refactor: allows for a docker build if the building machine is arm (a… #597

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

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

dimakis
Copy link
Contributor

@dimakis dimakis commented Aug 21, 2023

…pple silicon)

Issue link

Closes #596

What changes have been made

edit to the docker build make target to build an x86 arch image on an apple silicon machine.

Verification steps

1 - On an apple silicon machine, run make images and this should successfully generate an x86 arch image.
2 - Deploy this image in a RHODS or ODH environment, with the CodeFlare stack and validate that MCAD runs as expected

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

@openshift-ci openshift-ci bot requested review from KPostOffice and z103cb August 21, 2023 17:13
@asm582
Copy link
Member

asm582 commented Aug 22, 2023

@dimakis Thanks for this PR, do we know why Travis is building the branch?

@asm582
Copy link
Member

asm582 commented Sep 6, 2023

Do we know what is pending for this PR?

@dimakis
Copy link
Contributor Author

dimakis commented Sep 6, 2023

Do we know what is pending for this PR?

it looks like the build failed when not on a mac, I'll have to find someone with linux and get them to run it. I'll look into this today

@dimakis dimakis force-pushed the edit-make-file-build-m1-support branch 4 times, most recently from 915af32 to 0974c74 Compare September 7, 2023 10:33
@ChristianZaccaria
Copy link
Contributor

Tested changes locally 👍

@dimakis dimakis force-pushed the edit-make-file-build-m1-support branch from 8ccbbd6 to 25cdf2a Compare September 7, 2023 11:39
@ChristianZaccaria
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Sep 7, 2023
@dimakis
Copy link
Contributor Author

dimakis commented Sep 7, 2023

@asm582 can you verify this on a mac? I've done it already but would like someone that isn't me

@jbusche
Copy link
Contributor

jbusche commented Sep 7, 2023

Well, shoot @dimakis, I've got issues! So my M1 mac is running Ventura 13.5.1

uname -a
Darwin Jamess-MacBook-Pro.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64

and when I build with either make images or make images-podamn I'm getting arm images:

docker inspect localhost/mcad-controller:edit-make-file-build-m1-support-v1.34.0 |grep Arch
          "Architecture": "arm64",

I wonder if this is because I don't have docker, IBM forces the use of podman on our laptops. Trying to see there's something I can do to get it to work with this pr, but no luck so far.

@jbusche
Copy link
Contributor

jbusche commented Sep 7, 2023

OK, I just helm installed my arm image onto kind on my m1 machine, and it was able to run fine. I was able to deploy a few appwrappers.

uname -m
arm64

helm install mcad-controller --namespace kube-system --generate-name --set image.repository=quay.io/jbusche/mcad-controller --set image.tag=edit-make-file-build-m1-support-v1.34.1

oc describe pod mcad-controller-6ffbdb4dbc-sgdzx -n kube-system |grep Image:
    Image:         quay.io/jbusche/mcad-controller:edit-make-file-build-m1-support-v1.34.1

@dimakis
Copy link
Contributor Author

dimakis commented Sep 8, 2023

Well, shoot @dimakis, I've got issues! So my M1 mac is running Ventura 13.5.1


uname -a

Darwin Jamess-MacBook-Pro.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64

and when I build with either make images or make images-podamn I'm getting arm images:


docker inspect localhost/mcad-controller:edit-make-file-build-m1-support-v1.34.0 |grep Arch

          "Architecture": "arm64",

I wonder if this is because I don't have docker, IBM forces the use of podman on our laptops. Trying to see there's something I can do to get it to work with this pr, but no luck so far.

I should have specified. This only changes the docker cmd and not podman. Sorry. I forgot ibm won't let you use docker 🤦‍♂️

@dimakis
Copy link
Contributor Author

dimakis commented Oct 2, 2023

@KPostOffice can you quickly verify this please? its been here for an age

@KPostOffice
Copy link
Contributor

Still successfully builds on my x86-64 ThinkPad

@KPostOffice
Copy link
Contributor

/lgtm

@dimakis
Copy link
Contributor Author

dimakis commented Oct 2, 2023

Thanks. I thought you had a mac though😩

@anishasthana you've got a mac right?

Copy link

openshift-ci bot commented Nov 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: KPostOffice

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot merged commit 280e750 into main Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Docker build on m1 mac
6 participants