-
Notifications
You must be signed in to change notification settings - Fork 99
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
[URGENT] WebAPI container has not built due to segmentation fault #496
Comments
I found this article: https://devblogs.microsoft.com/dotnet/improving-multiplatform-container-support/ This article says .NET does not support QEMU, and alternatives to create container image for other platform. Generating WebAPI container image depends So I changed with following patch: diff --git a/src/CarbonAware.WebApi/src/Dockerfile b/src/CarbonAware.WebApi/src/Dockerfile
index f01e277..906230a 100644
--- a/src/CarbonAware.WebApi/src/Dockerfile
+++ b/src/CarbonAware.WebApi/src/Dockerfile
@@ -1,11 +1,12 @@
-FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
+FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
+ARG TARGETARCH
WORKDIR /app
ENV DOTNET_ROLL_FORWARD LatestMajor
# Copy everything from source
COPY . ./
# Use implicit restore to build and publish
-RUN dotnet publish CarbonAware.WebApi/src/CarbonAware.WebApi.csproj -c Release -o publish
+RUN dotnet publish CarbonAware.WebApi/src/CarbonAware.WebApi.csproj -a $TARGETARCH -o publish
# Generate OpenAPI spec
WORKDIR /app/CarbonAware.WebApi/src
RUN dotnet tool restore && \ However I saw following error when I attempt to create WebAPI container image.
Maybe they are resolved if we update dependency versions, but I don't know why they are not seen without the change. Someone can resove them? |
Maybe the cause is "Native dependencies": https://learn.microsoft.com/en-us/dotnet/core/deploying/deploy-with-cli#native-dependencies So can we update dependencies? I think it is allowed because we've already migrated to .NET 8. |
@vaughanknight @danuw |
Contact Details
@YaSuenag
What happened?
#493 has been merged, then 2-pre-release.yaml was triggered,but it failed due to segmentation fault. It seems to occur on Arm64 only. (x64 seems to be done without any error)
I did not see this segfault on my environment (Podman on Fedora 39 AArch64), so it is not a bug in CASDK, but we need to investigate.
@danuw @vaughanknight Can you run again 2-pre-release.yaml ? And do you know any known issue about this?
client
WebAPI (Default)
Relevant log output
https://github.com/Green-Software-Foundation/carbon-aware-sdk/actions/runs/8536833345/job/23386182495#step:6:643
Code of Conduct
The text was updated successfully, but these errors were encountered: