Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

441
Vistas
Tensorflow not found on pip install inside Docker Container using Mac M1

I'm trying to run some projects using the new Mac M1. Those projects already work on Intel processor and are used by other developers that use Intel.

I am not able to build this simple Dockerfile:

FROM python:3.9

RUN python -m pip install --upgrade pip

RUN pip install tensorflow==2.6.2

I get this message:

 > [3/3] RUN pip install tensorflow==2.6.2:                                                                                                            
#6 0.583 ERROR: Could not find a version that satisfies the requirement tensorflow==2.6.2 (from versions: none)                                        
#6 0.583 ERROR: No matching distribution found for tensorflow==2.6.2  

I am able to install tensorflow locally, outside of the Dockerfile. Also, friends are able to build this image from their intel Mac.

I even tried to run docker build com different console architectures: i386 and arm64, but none work.

Any suggestions?

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

EDIT: you may want to check menrfa's answer by looking at https://github.com/KumaTea/tensorflow-aarch64


The package tensorflow is not available for armv8.

I'll guessing your local python is running using rosetta2 (intel x86_64). You can check that using:

python3 -c "import platform; print(platform.machine())"
x86_64

The solution is forcing Docker to build that image for x86_64 also. It's easy. Just change your Dockerfile to:

FROM --platform=linux/x86_64 python:3.9

RUN python -m pip install --upgrade pip

RUN pip install tensorflow==2.6.2

Or, if you do not want to change your Dockerfile, you may build that image with:

docker build --platform linux/x86_64 -t myimage .

post note:

as [tyrex] said in a comment, although the tensorflow gets installed on the armv8, it will probably fail due to some bugs on the emulation (eg qemu: uncaught target signal 6 (Aborted) - core dumped).

He solved his requirements using PyTorch instead.

over 4 years ago · Santiago Trujillo Denunciar

0

The following works for me. (Chip Apple M1 Pro + MacOS 12.1)

Docker: Debian GNU/Linux 11 (bullseye)

RUN pip install tensorflow==2.6.0 -f https://tf.kmtea.eu/whl/stable.html

Obviously thanks to https://github.com/KumaTea/tensorflow-aarch64

over 4 years ago · Santiago Trujillo Denunciar

0

Tensorflow currently does not provide binaries (.whl files) for linux/arch64 inside docker containers on M1.

But you can use my prebuilt TensorFlow .whl file for M1: https://github.com/diyor28/tf-docker-m1

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda