conda-forge / miniforge

A conda-forge distribution.
https://conda-forge.org/miniforge
Other
6.25k stars 323 forks source link

Support Windows on Arm #297

Open pbo-linaro opened 2 years ago

pbo-linaro commented 2 years ago

Comment:

Hello,

we would like to contribute to conda-forge by helping to enable Windows arm64 architecture.

From what I understood, miniconda installer is developed by Anaconda, and it's code is not opened (to the opposite of miniforge). Is that possible to add support for an "alien" python (arm64) in conda, or does Anaconda only can do this (before even talking about building packages)?

Thanks, Pierrick

isuruf commented 2 years ago

Hi @pbo-linaro. No, Anaconda support is not necessary except for adding support in conda, conda-build and anaconda.org which should need only minimal changes to support in the codebase. We can co-ordinate with them on that. Not a big deal. Building packages is the big issue. Note that supporting a new platform is a big ask from the maintainers and therefore the most important questions are IMHO,

  1. How much of a user base is there? Is it worth adding support?
  2. Will you be able to provide continual engineering support to keep the platform support up-to-date?
  3. Is there a CI platform supporting win-arm64 that we can use freely?
  4. Will you be able to provide hardware access for debugging?
isuruf commented 2 years ago

See also this thread from one of your colleagues at https://groups.google.com/g/conda-forge/c/zbJDq7EnM34/m/pEIPyfKDBgAJ?utm_medium=email&utm_source=footer

pbo-linaro commented 2 years ago

Hi @isuruf,

since Niyas took contact with you, the biggest change is that now, Azure provides (non free) arm64 vm.

  1. It's slowly but surely growing up. Beyond raw number of users, we consider Conda is a great tool to distribute software for Windows.
  2. We are now considering to enable some packages thanks to Conda.
  3. Not yet, but we have a subscription on Azure, and we can consider to provide one machine to build/start experiment. Once official runners will be available, the switch will be easy.
  4. Does an Azure VM would be considered enough or are you talking about dedicated hardware?

In the previous thread, you mentioned we can start with a windows-x86_64 build for conda. Alas, since the included python is not arm64, I don't now how to express packages needed are for "another" architecture (conda info is win-x64). Maybe I missed something, but is that blocking?

isuruf commented 2 years ago

In the previous thread, you mentioned we can start with a windows-x86_64 build for conda. Alas, since the included python is not arm64, I don't now how to express packages needed are for "another" architecture (conda info is win-x64). Maybe I missed something, but is that blocking?

No, conda-build can use a base x86_64 build, but build packages for arm64. Also conda can create an environment for any os-arch combination. For eg: CONDA_SUBDIR=linux-aarch64 conda create -n zlib zlib will give you a Linux aarch64 build regardless of the os/arch you are using.

pbo-linaro commented 2 years ago

👍

Basically, we can start playing with this on a dedicated channel we own if needed.

The missing thing here is that conda-build is preconfigured for x64 architecture. So, how can I configure it to create packages for another arch (that is not yet known)?

isuruf commented 2 years ago

By setting target_platform to win-arm64. For eg: https://github.com/conda/conda-build/blob/3b99b2222a067e113a2282926871cd1e5406ee2b/tests/test-recipes/variants/25_target_platform_looping/conda_build_config.yaml#L1

pbo-linaro commented 2 years ago

I'm trying to build a package for this "new" architecture.

Alas, conda build insists on finding a repodata.json for it: FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\wenv\arm64_vs2022\conda\conda-bld\win-arm64\repodata.json'

Is there a way to bypass this? (my package has no dependency)

Thanks, Pierrick

EwoutH commented 1 year ago

I would love to have installers for Windows ARM64 (aarch64)!