spleeter icon indicating copy to clipboard operation
spleeter copied to clipboard

[Feature] Build M1 Mac ARM64 Images

Open spuder opened this issue 3 years ago • 4 comments

Docker images are currently built for intel/amd only.

It would be nice to have M1 mac Arm builds

How to do this

  1. Use buildx with docker. It natively supports multi platform builds
  2. Add the platform to the github action

Here is an example

        name: Build and push
        uses: docker/build-push-action@v2
        with:
          context: .
          platforms: linux/amd64, linux/arm64
          push: true
          tags: spuder/stl2origin:latest
          ```

spuder avatar Jan 24 '22 22:01 spuder

Hi @spuder, well, having an ARM image could be nice, but from what I understand:

  1. It would requires to build tensorflow from source for ARM which could be a pain.
  2. the image would not be able to take advantage of M1 features. For instance, from what I see here, you cannot install tensorflow-metal within a docker image, so that would be quite inefficient compared to a native M1 install, that is not straightforward but is working quite well. So if you have skills to build such an image, please do so and make a PR :).

romi1502 avatar Feb 04 '22 07:02 romi1502

Hi @spuder, well, having an ARM image could be nice, but from what I understand:

  1. It would requires to build tensorflow from source for ARM which could be a pain.
  2. the image would not be able to take advantage of M1 features. For instance, from what I see here, you cannot install tensorflow-metal within a docker image, so that would be quite inefficient compared to a native M1 install, that is not straightforward but is working quite well. So if you have skills to build such an image, please do so and make a PR :).

Tensorflow for aarch64 https://pypi.org/project/tensorflow-aarch64/ But various contributors have repo's with wheels available and don't think that is a problem.

I don't know about M1 or NPU usage or what the state of play is here https://github.com/deezer/spleeter/issues/607#issuecomment-828352392

I thought spleeter uses IntelMKL math libs and that is the biggest problem but maybe not...?

StuartIanNaylor avatar Feb 17 '22 06:02 StuartIanNaylor

Is that workaround still needed or is there meanwhile a better solution ?

daslicht avatar May 16 '22 09:05 daslicht

Hi, this is still an issue and I would like to work on it. I tried to use the latest image available for Spleeter, and it still runs into issues with AVX instructions, something which has been described in issues such as this.

Here's a screenshot of the error given:

image