My host machine is windows but got a python project running on linux. So I started utilizing Docker to containerize a Ubuntu os equipped with tensorflow, which I already downloaded its .whl file and COPY
to my image. However when using pip3 install ...whl
it showed the error ERROR: tensorflow-1.14.0-cp36-cp36m-manylinux1_x86_64.whl is not a supported wheel on this platform.
My Dockerfile is as follows:
FROM ubuntu:latest# Update and install necessary packagesRUN apt-get updateRUN apt-get install -y software-properties-commonRUN add-apt-repository ppa:deadsnakes/ppaRUN apt-get updateRUN apt-get install -y python3.7RUN ln -s /usr/bin/python3 /usr/bin/pythonRUN apt-get install -y python3-pip# Set the current working directoryWORKDIR /app# Copy the wheel file from your local directory to the containerCOPY tensorflow-1.14.0-cp36-cp36m-manylinux1_x86_64.whl /app/COPY tensorflow_compression-1.2-cp36-cp36m-manylinux1_x86_64.whl /app/# Install required dependanciesRUN pip3 install range-coderRUN pip3 install tensorflow-1.14.0-cp36-cp36m-manylinux1_x86_64.whl # Error at this line!RUN pip3 install tensorflow_compression-1.2-cp36-cp36m-manylinux1_x86_64.whl
I've tried using pip3 install tensorflow==1.14.0
directly from online repository BUT this edition couldn't be found with python3.7
The project originally asked to use python 3.6. In that case tensorflow1.14.0 can be found in online repository but another dependancy requires at least 3.7 for python :(
RUN pip3 install tensorflow==1.14.0Collecting tensorflow==1.14.0Downloading https://files.pythonhosted.org/packages/de/f0/96fb2e0412ae9692dbf400e5b04432885f677ad6241c088ccc5fe7724d69/tensorflow-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (109.2MB)..(other packages being downloaded).protobuf requires Python '>=3.7' but the running Python is 3.6.9
From the runtime error report I can tell the tensorflow it downloaded online is exactly tensorflow-1.14.0-cp36-cp36m-manylinux1_x86_64.whl
, which in my work I already have this wheel prepared. So why Ubuntu refuses to recognize this wheel when installing locally.