diff --git a/Dockerfile b/Dockerfile index 6df385b9..4648c668 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ COPY . ./ RUN echo "Building on ${BUILDPLATFORM} for ${TARGETPLATFORM}" +RUN dotnet add src/ESPresense.Companion.csproj package MathNet.Numerics.Providers.MKL RUN dotnet restore RUN dotnet publish -c Release -o out @@ -30,6 +31,13 @@ ENV ASPNETCORE_URLS="http://+:8267" \ OTA_UPDATE_PORT=8268 \ CONFIG_DIR="/config/espresense" +RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \ + apt-get update && apt-get install -y apt-transport-https gnupg software-properties-common wget && \ + wget -qO - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor -o /usr/share/keyrings/intel-software.gpg && \ + echo "deb [signed-by=/usr/share/keyrings/intel-software.gpg] https://apt.repos.intel.com/mkl all main" > /etc/apt/sources.list.d/intel-mkl.list && \ + apt-get update && apt-get install -y intel-mkl-64bit-2020.0-088; \ + fi + COPY --from=build-env /App/out . LABEL \