Skip to content

Unable to build docker image on Apple M4 chip (required for development, not for real inference) #611

Open
@shkarupa-alex

Description

@shkarupa-alex

System Info

This solution from README doesn't work

DISCLAIMER
As explained here pytorch/pytorch#81224, Metal / MPS is not supported via Docker. As such inference will be CPU bound and most likely pretty slow when using this docker image on an M1/M2 ARM CPU.

docker build . -f Dockerfile --platform=linux/arm64

It raises error:

9.351 E: Unable to locate package intel-oneapi-mkl-devel
------
Dockerfile:35
--------------------
  34 |     
  35 | >>> RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
  36 | >>>     intel-oneapi-mkl-devel=2024.0.0-49656 \
  37 | >>>     build-essential \
  38 | >>>     && rm -rf /var/lib/apt/lists/*
  39 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends     intel-oneapi-mkl-devel=2024.0.0-49656     build-essential     && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

Information

  • Docker
  • The CLI directly

Tasks

  • An officially supported command
  • My own modifications

Reproduction

  1. Obtain Apple with M4 chip (MacBook Pro)
  2. Checkout v1.7.0 branch
  3. Run docker build . -f Dockerfile --platform=linux/arm64

Expected behavior

There should be way to use this project as a part of docker compose (for development).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions