Open MaurGi opened 10 months ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Hello, yes, M1 (and ARM processors in general) are supported. You are looking in the Debian package repos for .NET, but Debian does not produce their own distribution of .NET.
You probably want to use mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim
image as your base image, and install python on that image. It is a multi-platform image with support for AMD64, ARM32, and ARM64.
Ubuntu provides their own distribution of .NET, but looks like it might be AMD64 only at the moment - https://packages.ubuntu.com/search?suite=jammy&arch=any&searchon=names&keywords=dotnet-sdk-6.0
FYI: Both Arm64 and Amd64 are available in jammy-updates
.
https://packages.ubuntu.com/search?suite=jammy-updates&searchon=names&keywords=dotnet6
Hello, yes, M1 (and ARM processors in general) are supported. You are looking in the Debian package repos for .NET, but Debian does not produce their own distribution of .NET.
You probably want to use
mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim
image as your base image, and install python on that image. It is a multi-platform image with support for AMD64, ARM32, and ARM64.Ubuntu provides their own distribution of .NET, but looks like it might be AMD64 only at the moment - https://packages.ubuntu.com/search?suite=jammy&arch=any&searchon=names&keywords=dotnet-sdk-6.0
Hi - thanks for your reply! I am explicitly adding the bookworm dep repo from Microsoft here:
RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb
so it should be found there, am I correct?
FYI: Both Arm64 and Amd64 are available in
jammy-updates
.https://packages.ubuntu.com/search?suite=jammy-updates&searchon=names&keywords=dotnet6
thanks - I am trying to use Debian though, do you suggest I switch to Ubuntu?
Consider that the same dockerfile works great when build on a Windows box...
Sorry for the confusion.
Yes, you can install .NET from packages.microsoft.com for Debian, directly from Ubuntu, or you can start with .NET images instead of Python ones. Those are all fine choices.
Sorry for the confusion.
Yes, you can install .NET from packages.microsoft.com for Debian, directly from Ubuntu, or you can start with .NET images instead of Python ones. Those are all fine choices.
I don't see any arm64 .NET packages available from packages.microsoft.com. /cc @leecow who owns this area.
I think the easiest solution would be to use the mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim
image as a base since it is multi-platform and contains ARM binaries for .NET.
That is a viable workaround, thx. I am not blocked, though @lbussell since I mainly work off of VSCode Remote from a Windows PC, that is not showing this problem, and I'd rather not change the base image since there is a lot that happens after that initial setup - I wonder how many other customers are having problems installing other MSFT packages on Debian12/Mac/ARM64.
We currently do not build ARM64 .DEB installers, which is why they are not available on packages.microsoft.com. Discussions are ongoing but I can't guess at the decisions or timelines. It would make sense to make the architecture situation clear in our Linux install documentation.
Oops. You are right Lee.
We currently do not build ARM64 .DEB installers, which is why they are not available on packages.microsoft.com. Discussions are ongoing but I can't guess at the decisions or timelines. It would make sense to make the architecture situation clear in our Linux install documentation.
yep that's where I got the info from - so what are my options? use a base Debian image with dotnet pre-installed?
The other option is install.sh
.
got it - testing with install.sh with the instructions here: https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install
thx
Note that just using the dotnet-install.sh
as per above does not set the PATH or creates a lint in the /usr/bin folder - this worked though:
# Use an official Python runtime as a parent image
FROM python:3.12-slim-bookworm
# Scripted install for dotnet
# replaces apt-get install -y dotnet-sdk-6.0
# From https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
&& chmod +x ./dotnet-install.sh \
&& ./dotnet-install.sh --channel 6.0 --version latest \
&& rm ./dotnet-install.sh
ENV DOTNET_ROOT="/root/.dotnet"
ENV PATH="$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools"
# Install sppech tools
RUN dotnet tool install --global Microsoft.CognitiveServices.Speech.CLI
Yup. That should work fine.
Here's another pattern:
@leecow,
Is this something you want to take a look at?
@Forgind - not sure what you're asking about? Richard's suggestion was a way in which Deb-based ARM64 users can acquire .NET.
I'm not an expert, but it sounded like they might get the SDK, but we don't have arch-specific packages for them. @baronfel suggested that was an issue you were looking into?
This feels like a point in time problem with an acceptable workaround. Fair?
At the moment, we're not planning on producing Arm64 Linux packages. We'd much rather see .NET supported in official distro archives. The availability of x64 packages in both Ubuntu and packages.microsoft.com feeds almost does more harm than good. We would prefer not to repeat that with Arm64.
Describe the bug
Getting
Unable to locate package dotnet-sdk-6.0
when installing any dotnet component in a debian container on Mac M1 silicon - Works on PC.To Reproduce
Dockerfile:
run:
Is the mac M1 supported?
Exceptions (if any)
Further technical details
dotnet --info