diff --git a/docker/al2-dotnet5-opencv4.5.3/Dockerfile b/docker/al2-dotnet5-opencv4.5.3/Dockerfile index 2f2b0b9c0..6a6c6a227 100644 --- a/docker/al2-dotnet5-opencv4.5.3/Dockerfile +++ b/docker/al2-dotnet5-opencv4.5.3/Dockerfile @@ -58,7 +58,7 @@ RUN cd opencv && mkdir build && cd build && \ -D BUILD_opencv_wechat_qrcode=OFF \ -D WITH_GSTREAMER=OFF \ -D OPENCV_ENABLE_NONFREE=ON \ - .. && make -j8 && make install + .. && make -j$(nproc) && make install # Download OpenCvSharp RUN wget https://github.com/shimat/opencvsharp/archive/master.zip && \ diff --git a/docker/ubuntu20-dotnet5-opencv4.5.3/Dockerfile b/docker/ubuntu20-dotnet5-opencv4.5.3/Dockerfile index 3982cd984..1c0217504 100644 --- a/docker/ubuntu20-dotnet5-opencv4.5.3/Dockerfile +++ b/docker/ubuntu20-dotnet5-opencv4.5.3/Dockerfile @@ -82,7 +82,7 @@ RUN cd opencv && mkdir build && cd build && \ -D BUILD_opencv_structured_light=OFF \ -D BUILD_opencv_surface_matching=OFF \ -D BUILD_opencv_videostab=OFF \ - -D BUILD_opencv_wechat_qrcode=OFF \ + -D BUILD_opencv_wechat_qrcode=ON \ -D WITH_GSTREAMER=OFF \ -D WITH_ADE=OFF \ -D OPENCV_ENABLE_NONFREE=ON \ @@ -128,14 +128,14 @@ COPY --from=builder /usr/lib /usr/lib # Install Build the C# part of OpenCvSharp RUN git clone https://github.com/shimat/opencvsharp.git && cd opencvsharp RUN cd /opencvsharp/src/OpenCvSharp && \ - dotnet build -c Release -f netcoreapp3.1 && \ + dotnet build -c Release -f net5.0 && \ cd /opencvsharp/src/OpenCvSharp.Extensions && \ - dotnet build -c Release -f netcoreapp2.1 + dotnet build -c Release -f net5.0 RUN dotnet test /opencvsharp/test/OpenCvSharp.Tests/OpenCvSharp.Tests.csproj -c Release -f net5.0 --runtime ubuntu.20.04-x64 --logger "trx;LogFileName=test-results.trx" < /dev/null # Simple console app test using NuGet -#RUN dotnet new console -f netcoreapp3.1 -o "ConsoleApp01" && cd /ConsoleApp01 && \ +#RUN dotnet new console -f net5.0 -o "ConsoleApp01" && cd /ConsoleApp01 && \ # echo "\n\ #using System; \n\ #using OpenCvSharp; \n\ diff --git a/docker/ubuntu20-dotnet5sdk-opencv4.5.3/Dockerfile b/docker/ubuntu20-dotnet5sdk-opencv4.5.3/Dockerfile index 3a40ba4b6..11809e34e 100644 --- a/docker/ubuntu20-dotnet5sdk-opencv4.5.3/Dockerfile +++ b/docker/ubuntu20-dotnet5sdk-opencv4.5.3/Dockerfile @@ -128,14 +128,14 @@ COPY --from=builder /usr/lib /usr/lib # Install Build the C# part of OpenCvSharp RUN git clone https://github.com/shimat/opencvsharp.git && cd opencvsharp RUN cd /opencvsharp/src/OpenCvSharp && \ - dotnet build -c Release -f netcoreapp3.1 && \ + dotnet build -c Release -f net5.0 && \ cd /opencvsharp/src/OpenCvSharp.Extensions && \ - dotnet build -c Release -f netcoreapp2.1 + dotnet build -c Release -f net5.0 RUN dotnet test /opencvsharp/test/OpenCvSharp.Tests/OpenCvSharp.Tests.csproj -c Release -f net5.0 --runtime ubuntu.20.04-x64 --logger "trx;LogFileName=test-results.trx" < /dev/null # Simple console app test using NuGet -#RUN dotnet new console -f netcoreapp3.1 -o "ConsoleApp01" && cd /ConsoleApp01 && \ +# RUN dotnet new console -f net5.0 -o "ConsoleApp01" && cd /ConsoleApp01 && \ # echo "\n\ #using System; \n\ #using OpenCvSharp; \n\ diff --git a/docker/ubuntu20-dotnet6-opencv4.5.3/Dockerfile b/docker/ubuntu20-dotnet6-opencv4.5.3/Dockerfile index e349336c2..566f5b484 100644 --- a/docker/ubuntu20-dotnet6-opencv4.5.3/Dockerfile +++ b/docker/ubuntu20-dotnet6-opencv4.5.3/Dockerfile @@ -82,7 +82,7 @@ RUN cd opencv && mkdir build && cd build && \ -D BUILD_opencv_structured_light=OFF \ -D BUILD_opencv_surface_matching=OFF \ -D BUILD_opencv_videostab=OFF \ - -D BUILD_opencv_wechat_qrcode=OFF \ + -D BUILD_opencv_wechat_qrcode=ON \ -D WITH_GSTREAMER=OFF \ -D WITH_ADE=OFF \ -D OPENCV_ENABLE_NONFREE=ON \ @@ -128,14 +128,14 @@ COPY --from=builder /usr/lib /usr/lib # Install Build the C# part of OpenCvSharp RUN git clone https://github.com/shimat/opencvsharp.git && cd opencvsharp RUN cd /opencvsharp/src/OpenCvSharp && \ - dotnet build -c Release -f netcoreapp3.1 && \ + dotnet build -c Release -f net6.0 && \ cd /opencvsharp/src/OpenCvSharp.Extensions && \ - dotnet build -c Release -f netcoreapp2.1 + dotnet build -c Release -f net6.0 RUN dotnet test /opencvsharp/test/OpenCvSharp.Tests/OpenCvSharp.Tests.csproj -c Release -f net6.0 --runtime ubuntu.20.04-x64 --logger "trx;LogFileName=test-results.trx" < /dev/null # Simple console app test using NuGet -#RUN dotnet new console -f netcoreapp3.1 -o "ConsoleApp01" && cd /ConsoleApp01 && \ +# RUN dotnet new console -f net6.0 -o "ConsoleApp01" && cd /ConsoleApp01 && \ # echo "\n\ #using System; \n\ #using OpenCvSharp; \n\ diff --git a/docker/ubuntu20-dotnet6sdk-opencv4.5.3/Dockerfile b/docker/ubuntu20-dotnet6sdk-opencv4.5.3/Dockerfile index 284e87e3b..6c057eb32 100644 --- a/docker/ubuntu20-dotnet6sdk-opencv4.5.3/Dockerfile +++ b/docker/ubuntu20-dotnet6sdk-opencv4.5.3/Dockerfile @@ -82,7 +82,7 @@ RUN cd opencv && mkdir build && cd build && \ -D BUILD_opencv_structured_light=OFF \ -D BUILD_opencv_surface_matching=OFF \ -D BUILD_opencv_videostab=OFF \ - -D BUILD_opencv_wechat_qrcode=OFF \ + -D BUILD_opencv_wechat_qrcode=ON \ -D WITH_GSTREAMER=OFF \ -D WITH_ADE=OFF \ -D OPENCV_ENABLE_NONFREE=ON \ @@ -128,27 +128,27 @@ COPY --from=builder /usr/lib /usr/lib # Install Build the C# part of OpenCvSharp RUN git clone https://github.com/shimat/opencvsharp.git && cd opencvsharp RUN cd /opencvsharp/src/OpenCvSharp && \ - dotnet build -c Release -f netcoreapp3.1 && \ + dotnet build -c Release -f net6.0 && \ cd /opencvsharp/src/OpenCvSharp.Extensions && \ - dotnet build -c Release -f netcoreapp2.1 + dotnet build -c Release -f net6.0 RUN dotnet test /opencvsharp/test/OpenCvSharp.Tests/OpenCvSharp.Tests.csproj -c Release -f net6.0 --runtime ubuntu.20.04-x64 --logger "trx;LogFileName=test-results.trx" < /dev/null # Simple console app test using NuGet -#RUN dotnet new console -f netcoreapp3.1 -o "ConsoleApp01" && cd /ConsoleApp01 && \ -# echo "\n\ -#using System; \n\ -#using OpenCvSharp; \n\ -#class Program{ \n\ -# static void Main(){ \n\ -# Console.WriteLine(Cv2.GetTickCount()); \n\ -# using var mat = new Mat(1, 1, MatType.CV_8UC1); \n\ -# Console.WriteLine(mat.CvPtr); \n\ -# } \n\ -#}" > Program.cs && \ -# dotnet add package OpenCvSharp4 && \ -# dotnet run && \ -# rm -rf /ConsoleApp01 +# RUN dotnet new console -f net6.0 -o "ConsoleApp01" && cd /ConsoleApp01 && \ +# echo "\n\ +# using System; \n\ +# using OpenCvSharp; \n\ +# class Program{ \n\ +# static void Main(){ \n\ +# Console.WriteLine(Cv2.GetTickCount()); \n\ +# using var mat = new Mat(1, 1, MatType.CV_8UC1); \n\ +# Console.WriteLine(mat.CvPtr); \n\ +# } \n\ +# }" > Program.cs && \ +# dotnet add package OpenCvSharp4 && \ +# dotnet run && \ +# rm -rf /ConsoleApp01 #RUN ldd /artifacts/libOpenCvSharpExtern.so