Skip to content

Commit

Permalink
Upgrade from Buster to Bullseye Docker intermediate opencv image (#609)
Browse files Browse the repository at this point in the history
* Upgrade from Buster to Bullseye Docker intermediate opencv image

Signed-off-by: jbpaux <[email protected]>

* Remove uneeded RUN commands

Signed-off-by: jbpaux <[email protected]>

* Remove ADE to cmpile OpenCV

Signed-off-by: jbpaux <[email protected]>

---------

Signed-off-by: jbpaux <[email protected]>
  • Loading branch information
jbpaux authored May 26, 2023
1 parent 30dfc25 commit 54d5584
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions build/containers/intermediate/Dockerfile.opencvsharp-build
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 54d5584

Please sign in to comment.