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

add LoongArch64’s docker image #856

Open
shushanhf opened this issue Apr 24, 2023 · 10 comments
Open

add LoongArch64’s docker image #856

shushanhf opened this issue Apr 24, 2023 · 10 comments
Assignees

Comments

@shushanhf
Copy link

shushanhf commented Apr 24, 2023

add LoongArch64's image.

@shushanhf shushanhf changed the title add LoongArch64’s add LoongArch64’s docker image Apr 24, 2023
@shushanhf
Copy link
Author

@am11 @kant2002

We will start to add the LoongArch64's CI-tools.

I think I will need your help later.

Thanks

@shushanhf
Copy link
Author

This PR is part of the issue dotnet/runtime#69705 to amend the LA's port.

@am11
Copy link
Member

am11 commented Apr 24, 2023

RE: dotnet/arcade#8333 - we are still waiting for the status updates at https://wiki.debian.org/Ports/loong64, specifically debootstrap patches to merge in https://salsa.debian.org/installer-team/debootstrap and build-essential installability status to change.

As soon as all loongarch64 patches are pushed, we can consume it within a week in .NET engineering infrastructure.

@shushanhf
Copy link
Author

RE: dotnet/arcade#8333 - we are still waiting for the status updates at https://wiki.debian.org/Ports/loong64, specifically debootstrap patches to merge in https://salsa.debian.org/installer-team/debootstrap and build-essential installability status to change.

As soon as all loongarch64 patches are pushed, we can consume it within a week in .NET engineering infrastructure.

Thanks very much for your help and attention on LA64~

@shushanhf
Copy link
Author

RE: dotnet/arcade#8333 - we are still waiting for the status updates at https://wiki.debian.org/Ports/loong64, specifically debootstrap patches to merge in https://salsa.debian.org/installer-team/debootstrap and build-essential installability status to change.

As soon as all loongarch64 patches are pushed, we can consume it within a week in .NET engineering infrastructure.

Hi, @am11
Now we are amending the Deibian's LoongArch64 port.

Besides the Debian's image, are there other images to support LoongArch64's CI?
For example, the https://openanolis.cn/sig , http://www.openeuler.org/en/ and the https://www.alpinelinux.org/ .

If the CI supports LoongArch64's building, is it must a docker image running on AMD64-linux ?

@am11
Copy link
Member

am11 commented Apr 9, 2024

@shushanhf, things seem to be little slower on distros' adaptations of LA64. Alpine Linux https://gitlab.alpinelinux.org/alpine/tsc/-/issues/72 and https://salsa.debian.org/installer-team/debootstrap still has that initial loongarch commit added 2 years ago. Once they are available out-of-the-box, that will make things much simpler to adapt in dotnet infra.

Meanwhile, you can create an unofficial cross building container (cross compilation toolchain at /crossrootfs/loongarch64) and publish to Docker, GitHub packages etc. https://docs.github.com/en/actions/publishing-packages/publishing-docker-images. Then use it in GitHub Actions twice a day, e.g. to validate changes.

If the CI supports LoongArch64's building, is it must a docker image running on AMD64-linux ?

Host machine where docker command is running doesn't matter that much, but in CI, it's usually amd64 host. Image can run on any machine these days, e.g. on Apple Silicon machine docker run --platform linux/amd64 ubuntu uname -a shows x86_64. So depending on the docker configs, it will inject rosetta2 or qemu emulator to the container on mac host and qemu on linux. However, the base layer of dotnet prereqs images is amd64 for cross builder images atm. But, e.g., running that amd64 image with e.g. riscv64 rootfs on osx-arm64 slows down the compilation significantly. So I build the container locally with alpine-arm64 base layer (dotnet/arcade#14697 .. and ubuntu-arm64 base layers are also supported).

@shushanhf
Copy link
Author

@shushanhf, things seem to be little slower on distros' adaptations of LA64. Alpine Linux https://gitlab.alpinelinux.org/alpine/tsc/-/issues/72 and https://salsa.debian.org/installer-team/debootstrap still has that initial loongarch commit added 2 years ago. Once they are available out-of-the-box, that will make things much simpler to adapt in dotnet infra.

Meanwhile, you can create an unofficial cross building container (cross compilation toolchain at /crossrootfs/loongarch64) and publish to Docker, GitHub packages etc. https://docs.github.com/en/actions/publishing-packages/publishing-docker-images. Then use it in GitHub Actions twice a day, e.g. to validate changes.

If the CI supports LoongArch64's building, is it must a docker image running on AMD64-linux ?

Host machine where docker command is running doesn't matter that much, but in CI, it's usually amd64 host. Image can run on any machine these days, e.g. on Apple Silicon machine docker run --platform linux/amd64 ubuntu uname -a shows x86_64. So depending on the docker configs, it will inject rosetta2 or qemu emulator to the container on mac host and qemu on linux. However, the base layer of dotnet prereqs images is amd64 for cross builder images atm. But, e.g., running that amd64 image with e.g. riscv64 rootfs on osx-arm64 slows down the compilation significantly. So I build the container locally with alpine-arm64 base layer (dotnet/arcade#14697 .. and ubuntu-arm64 base layers are also supported).

Thanks very much.
I will ask my colleagues who pushing these OS image work.

@shushanhf
Copy link
Author

@shushanhf, things seem to be little slower on distros' adaptations of LA64. Alpine Linux https://gitlab.alpinelinux.org/alpine/tsc/-/issues/72 and https://salsa.debian.org/installer-team/debootstrap still has that initial loongarch commit added 2 years ago. Once they are available out-of-the-box, that will make things much simpler to adapt in dotnet infra.

Hi, @am11
Thanks very much for your so much help for LoongArch64.
My colleagues are pushing the Debian and alpine to supporting LA64 and they come a long way to reach the target.
The alpine is discussed within IRC and now the alpine had merge some parts and we can get a rootfs based on alpine liking https://dev.alpinelinux.org/~loongarch/edge-9c13e7/ . Maybe next month will be make further work for supporting LA64.

The Debian also merged some parts and only left a small part to support LA64 and these left are reviewing.

@am11
Copy link
Member

am11 commented Jun 21, 2024

@LuckyXu-HF this is the issue tracking cross-build support. It would be nice to straighten out a few things first.

For Alpine, https://gitlab.alpinelinux.org/alpine/apk-tools enabled loongarch64 two years ago but they are yet to produce an artifact for it. Looks like someone needs to raise an issue in their repo so we start seeing it in their releases https://gitlab.alpinelinux.org/alpine/apk-tools/-/releases. We can use https://dev.alpinelinux.org/~loongarch/edge/main/loongarch64/ to set it up differently in the script, but that would require bypassing the checksums which is not ideal for dotnet infra (images are moved to 'secure download' plan). IMO, the issue should be raised upstream in apk-tools repo to get the discussion started at least. If they are not going to support it any time soon, then we can look into alternative ways.

Same story with Debian that debootstrap got the LA64 support years ago, but still there is no image. Status of bootstrap and build-essentials hasn't changed in a while:
image

@LuckyXu-HF
Copy link

@LuckyXu-HF this is the issue tracking cross-build support. It would be nice to straighten out a few things first.

For Alpine, https://gitlab.alpinelinux.org/alpine/apk-tools enabled loongarch64 two years ago but they are yet to produce an artifact for it. Looks like someone needs to raise an issue in their repo so we start seeing it in their releases https://gitlab.alpinelinux.org/alpine/apk-tools/-/releases. We can use https://dev.alpinelinux.org/~loongarch/edge/main/loongarch64/ to set it up differently in the script, but that would require bypassing the checksums which is not ideal for dotnet infra (images are moved to 'secure download' plan). IMO, the issue should be raised upstream in apk-tools repo to get the discussion started at least. If they are not going to support it any time soon, then we can look into alternative ways.

Same story with Debian that debootstrap got the LA64 support years ago, but still there is no image. Status of bootstrap and build-essentials hasn't changed in a while

@am11 Thank you so much for your great help. I totally agree with you. If there are any further progress for debian/alpine etc, we will ping you promptly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

4 participants