-
Notifications
You must be signed in to change notification settings - Fork 104
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 helix image for armv6 raspbian #1083
base: main
Are you sure you want to change the base?
Changes from 14 commits
20ecbbb
7afb569
8667ab0
360f9ce
7d24c9c
232c599
7b1bad6
e59bdc7
95a10f5
832419e
e5366a6
131b3d4
c28e26d
2981dfd
989dbf0
f4ed118
3a2003b
f410e6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ARG ROOTFS_DIR=/crossrootfs | ||
|
||
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:raspbian-10-crossdeps-local as builder | ||
FROM --platform=linux/arm/v7 mcr.microsoft.com/dotnet-buildtools/prereqs:raspbian-12-crossdeps-local as builder | ||
|
||
ARG ROOTFS_DIR | ||
|
||
|
@@ -9,7 +9,7 @@ RUN git config --global user.email builder@dotnet-buildtools-prereqs-docker && \ | |
git clone --depth 1 --single-branch https://github.com/dotnet/arcade /scripts | ||
|
||
# Build the rootfs | ||
RUN /scripts/eng/common/cross/build-rootfs.sh armv6 raspbian --skipunmount | ||
RUN /scripts/eng/common/cross/build-rootfs.sh armv6 bookworm lldb15 --skipunmount | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @am11 FYI we can probably remove the code in https://github.com/dotnet/arcade/blob/d1bc0779143e410ec82696f9865c4eb407db8d67/eng/common/cross/build-rootfs.sh#L170-L183 which sets the __UbuntuRepo, __CodeName etc since that is handled by the |
||
|
||
FROM scratch | ||
ARG ROOTFS_DIR | ||
|
@@ -47,6 +47,7 @@ RUN apt-get update && \ | |
locales-all \ | ||
python3-dev \ | ||
python3-pip \ | ||
rustc \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/dotnet/dotnet-buildtools-prereqs-docker/pull/1145/files installs rust from rustup instead because apparently the rustc in bookworm is too old? |
||
sudo \ | ||
tzdata \ | ||
unzip \ | ||
|
@@ -58,13 +59,9 @@ RUN apt-get update && \ | |
ENV LANG=en_US.utf8 | ||
|
||
RUN ln -sf /usr/bin/python3 /usr/bin/python && \ | ||
curl https://bootstrap.pypa.io/get-pip.py -o ./get-pip.py --fail --silent --show-error && \ | ||
python ./get-pip.py && rm ./get-pip.py && \ | ||
python -m pip install --upgrade pip==20.2 && \ | ||
python -m pip install virtualenv==16.6.0 && \ | ||
pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple && \ | ||
export CRYPTOGRAPHY_DONT_BUILD_RUST=1 && \ | ||
pip install ./helix_scripts-*-py3-none-any.whl | ||
pip install ./helix_scripts-*-py3-none-any.whl --break-system-packages | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please add a comment why we need --break-system-packages There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatively, could we use the multistage docker + python venv approach we've done in all the other images and avoid using |
||
|
||
# Create helixbot user and give rights to sudo without password | ||
# (we use two users here to ensure volume mounting works with two possible UIDs of the host UID) | ||
|
@@ -77,4 +74,4 @@ RUN /usr/sbin/adduser --disabled-password --gecos '' --uid 1001 --shell /bin/bas | |
|
||
USER helixbot | ||
|
||
RUN python -m virtualenv --no-site-packages /home/helixbot/.vsts-env | ||
RUN python -m venv --no-site-packages /home/helixbot/.vsts-env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we passing --platform here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be
linux/arm/v6
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be necessary at all. That would only be necessary if you were pulling a multi-arch tag which isn't the case here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without
--platform
I am getting the following in ci:IIRC I could build this locally with
--platform
. I think v7 is right because the raspbian-12-crossdeps image says v7 in manifest.json. Let's see if this works in ci.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are going to replace "armv6" image and new image doesn't provide armv6, then it is not the right image? I think
uname -a
etc. should showarmv6l
. v7 and v6 are very different ISAs; which is why we have ARM and ARMV6 as separate architectures.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't make sense to me. This happens on the CI in AzDO? I can't find a failed build with that error. I'd like to see the build log to understand what's happening. Getting a
not found
error would mean the image tag doesn't exist at all, regardless of its platform.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am trying to follow the setup introduced in https://github.com/dotnet/dotnet-buildtools-prereqs-docker/pull/550/files#diff-d5da67421f1a1e08a8982140c63e4c621c9332ea33774a4db797a3dc334261b9 where the crossdeps image uses armv7, and it is used to build a rootfs for an armv6 helix image. The intention of adding
--platform
is to specify the armv7 variant for the crossdeps image, even though we are targeting armv6 in the final stage of this dockerfile. That's the idea, but not sure if our infrastructure supports this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mthalman see the build failures without
--platform
here.Locally, if I do
docker buildx build --platform=linux/arm/v6 .
and I leave out--platform=linux/arm/v7
from the base image, I get this:Which looks similar to the CI failure. If I keep
--platform=linux/arm/v7
in the dockerfile, it finds the image (which I built using--platform=linux/arm/v7
and tagged locally).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I get why
--platform
is needed now. That's fine. I'll leave it to the other reviewers to determine whether consuming a v7 image from a v6 image is the right thing to do.