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

Upgrade from Buster to Bullseye Docker intermediate opencv image #609

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions build/containers/intermediate/Dockerfile.opencvsharp-build
Expand Up @@ -10,7 +10,7 @@
#

ARG PLATFORM=
FROM mcr.microsoft.com/dotnet/aspnet:3.1-buster-slim${PLATFORM} AS base
FROM mcr.microsoft.com/dotnet/aspnet:3.1-bullseye-slim${PLATFORM} AS base
WORKDIR /app

# Link the container to the Akri repository
Expand All @@ -21,9 +21,6 @@ ENV OPENCV_VERSION="4.5.4"
ENV OPENCV_INSTALLATION_DIR="/opt/opencv/"
ENV OPENCV_SHARP_VERSION="4.5.3.20210821"

RUN whoami
RUN pwd

# Install opencv dependencies
RUN apt-get update && apt-get -y install --no-install-recommends \
apt-transport-https \
Expand Down Expand Up @@ -103,6 +100,7 @@ RUN cd ${OPENCV_INSTALLATION_DIR}/opencv-${OPENCV_VERSION} && \
-D BUILD_opencv_videostab=OFF \
-D BUILD_opencv_wechat_qrcode=OFF \
-D WITH_GSTREAMER=OFF \
-D WITH_ADE=OFF \
-D OPENCV_ENABLE_NONFREE=ON \
.. && make -j$(nproc) && \
make install -j8 && \
Expand All @@ -120,7 +118,7 @@ RUN cd ${OPENCV_INSTALLATION_DIR} && \
cp OpenCvSharpExtern/libOpenCvSharpExtern.so /usr/lib

# Don't force architecture here as it won't be working as expected
FROM mcr.microsoft.com/dotnet/sdk:3.1-buster AS build-dotnet-env
FROM mcr.microsoft.com/dotnet/sdk:3.1-bullseye AS build-dotnet-env

ARG PLATFORM

Expand All @@ -144,7 +142,7 @@ RUN mkdir /opencvsharp/build && \
cp /opencvsharp/src/OpenCvSharp.Extensions/bin/$([ -n "$PLATFORM" ] && echo "*")/Release/netstandard2.0/*/* .

# Copy over OpenCvSharp binaries and OpenCvSharpExtern shared library
FROM mcr.microsoft.com/dotnet/aspnet:3.1-buster-slim${PLATFORM}
FROM mcr.microsoft.com/dotnet/aspnet:3.1-bullseye-slim${PLATFORM}
WORKDIR /app
COPY --from=build-dotnet-env /opencvsharp/build ./
COPY --from=build-dotnet-env /libOpenCvSharpExtern.so /usr/lib
Expand Down
2 changes: 1 addition & 1 deletion build/intermediate-containers.mk
@@ -1,7 +1,7 @@

BUILD_RUST_CROSSBUILD_VERSION = 0.0.7

BUILD_OPENCV_BASE_VERSION = 0.0.10
BUILD_OPENCV_BASE_VERSION = 0.0.11

CROSS_VERSION = 0.1.16

Expand Down