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

build: Fix intermediate dotnet openCV image #596

Merged
merged 1 commit into from May 12, 2023

Conversation

diconico07
Copy link
Contributor

What this PR does / why we need it:

The image was built using the wrong version of opencvsharp, fix this.

Also switch to shallow clone to reduce build time (a bit).

Should fix #580

Special notes for your reviewer:

If applicable:

  • this PR has an associated PR with documentation in akri-docs
  • this PR contains unit tests
  • added code adheres to standard Rust formatting (cargo fmt)
  • code builds properly (cargo build)
  • code is free of common mistakes (cargo clippy)
  • all Akri tests succeed (cargo test)
  • inline documentation builds (cargo doc)
  • all commits pass the DCO bot check by being signed off -- see the failing DCO check for instructions on how to retroactively sign commits

@diconico07
Copy link
Contributor Author

/add-build-dependency-containers-label

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

👋 Added [build dependency containers] label :)!

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

👋 Added [build dependency containers] label :)!

@diconico07
Copy link
Contributor Author

/add-same-version-label

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

👋 Added [same version] label :)!

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

👋 Added [same version] label :)!

@diconico07 diconico07 force-pushed the fix-opencv-docker branch 2 times, most recently from 0087bcb to 2462fb1 Compare May 2, 2023 12:25
@jbpaux
Copy link
Contributor

jbpaux commented May 3, 2023

It should be helpful : dotnet/dotnet-docker#1537
I think in longterm we should switch to buildx

@diconico07
Copy link
Contributor Author

Thanks @jbpaux, this should do the trick now ...
👍 to switch to buildx (not only for intermediate containers), maybe we can do an issue for that.

And for this one in particular, I don't see much added value in maintaining this image, maybe we can find an alternative to opencv here that doesn't need hours of compilation on our side.

Copy link
Contributor

@kate-goldenring kate-goldenring left a comment

Choose a reason for hiding this comment

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

Just one nit on a missing platform and then LGTM!

@@ -18,15 +18,15 @@ opencv-base: opencv-base-build opencv-base-docker-per-arch
opencv-base-build: opencv-base-build-amd64 opencv-base-build-arm32 opencv-base-build-arm64
opencv-base-build-amd64:
ifeq (1, ${BUILD_AMD64})
docker build $(CACHE_OPTION) -f $(INTERMEDIATE_DOCKERFILE_DIR)/Dockerfile.opencvsharp-build . -t $(PREFIX)/opencvsharp-build:$(BUILD_OPENCV_BASE_VERSION)-$(AMD64_SUFFIX) --build-arg PLATFORM_TAG=3.1-buster-slim
docker build $(CACHE_OPTION) -f $(INTERMEDIATE_DOCKERFILE_DIR)/Dockerfile.opencvsharp-build . -t $(PREFIX)/opencvsharp-build:$(BUILD_OPENCV_BASE_VERSION)-$(AMD64_SUFFIX) --build-arg PLATFORM=
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like platform is missing here

Suggested change
docker build $(CACHE_OPTION) -f $(INTERMEDIATE_DOCKERFILE_DIR)/Dockerfile.opencvsharp-build . -t $(PREFIX)/opencvsharp-build:$(BUILD_OPENCV_BASE_VERSION)-$(AMD64_SUFFIX) --build-arg PLATFORM=
docker build $(CACHE_OPTION) -f $(INTERMEDIATE_DOCKERFILE_DIR)/Dockerfile.opencvsharp-build . -t $(PREFIX)/opencvsharp-build:$(BUILD_OPENCV_BASE_VERSION)-$(AMD64_SUFFIX) --build-arg PLATFORM=-$(AMD64_SUFFIX)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should add a comment here (and maybe remove the build-arg argument as well) this is intended, aspnet amd64 images are not suffixed and the other uses of the PLATFORM variable expect empty for amd64.

@kate-goldenring
Copy link
Contributor

And for this one in particular, I don't see much added value in maintaining this image, maybe we can find an alternative to opencv here that doesn't need hours of compilation on our side.

+1 to finding a way not to maintain this opencv image

@kate-goldenring
Copy link
Contributor

@diconico07 once this is in, we can then merge #594 and then #593, right?

@diconico07
Copy link
Contributor Author

@kate-goldenring that's right, we will also need another quick PR I didn't submit yet to change the USE_OPENCV_BASE_VERSION to 0.0.10, but that can easily come after #594 and #593

The image was built using the wrong version of opencvsharp,
fix this.

Also switch to shallow clone to reduce build time (a bit).

Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
@kate-goldenring
Copy link
Contributor

Sounds good. @diconico07 lets merge these in after this one: #599

@kate-goldenring kate-goldenring merged commit 7d6690a into project-akri:main May 12, 2023
15 checks passed
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.

OpenCV Container is Failing to Build
3 participants