tensorflow-aarch64 icon indicating copy to clipboard operation
tensorflow-aarch64 copied to clipboard

Tensor flow for Docker on Mac M1 pro

Open vcbkarthi opened this issue 2 years ago • 2 comments

would this wheel work on M1 pro Docker , tried but it does not import tensor flow and result in no module found error.

=> [internal] load build definition from HelloWorld.dockerfile 0.0s => => transferring dockerfile: 410B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/python:3.9 0.4s => [1/9] FROM docker.io/library/python:3.9@sha256:4c41af7a9e87a725aa0dd3857ceb51d0deea8923ceb362aa38eaa5e525a23a21 0.0s => [internal] load build context 0.0s => => transferring context: 68B 0.0s => CACHED [2/9] RUN python -m pip install --upgrade pip 0.0s => CACHED [3/9] RUN pip install tensorflow==2.6.0 -f https://tf.kmtea.eu/whl/stable.html 0.0s => CACHED [4/9] RUN pip install pandas 0.0s => CACHED [5/9] RUN pip install matplotlib 0.0s => CACHED [6/9] RUN pip install -U scikit-learn scipy matplotlib 0.0s => CACHED [7/9] RUN pip install nltk 0.0s => CACHED [8/9] COPY intent.json / 0.0s => CACHED [9/9] ADD TrainChatBot.py / 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:31d4858dc926f4663b4c0dbdf7c61ccff4ae26d7b449b913e96f600d3ce82d55 0.0s (base) karthik@192 Documents % docker images REPOSITORY TAG IMAGE ID CREATED SIZE a1b2dadd4492 8 minutes ago 1.49GB 31d4858dc926 3 hours ago 3.17GB f0dfd254a745 3 hours ago 3.17GB 2fa2d8bf0130 3 hours ago 3.15GB 06d19ce991f9 5 hours ago 1.41GB grafana/grafana-oss latest e44a96a6d890 8 days ago 263MB docker/getting-started latest adfdb308d623 8 weeks ago 27.4MB (base) karthik@192 Documents % docker run a1b2dadd4492 WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested Traceback (most recent call last): File "//./TrainChatBot.py", line 9, in import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow' (base) karthik@192 Documents %

vcbkarthi avatar Apr 08 '22 20:04 vcbkarthi

Any updates on this?

magedhelmy1 avatar Jul 17 '22 18:07 magedhelmy1

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Looks like you were pulling an x86 image instead of aarch64.

And I'm afraid that Apple M1 does not perfectly runs wheels built for Linux, and I would strongly advise you to try the official wheels for M1 (though I haven't tried personaly).

KumaTea avatar Sep 12 '22 18:09 KumaTea