I have a very basic dockerfile as follows:
FROM gcr.io/tensorflow/tensorflow:latest-gpu
FROM python:3.5
RUN pip install opencv-python
RUN apt-get update && apt-get install -y libsm6 libxext6 libxrender-dev
RUN pip install skll
RUN pip install keras
RUN pip install imutils
ADD . /model1
WORKDIR /model1
VOLUME ["/model1/data", "/model1/notebooks"]
I have been learning docker for a day so I accept that this probably breaks best practices.
My question is this - once I build this and run the container and then open python and run
import tensorflow
I get
ImportError: No module named 'tensorflow'
If I don't include python 3.5, when I open up python its version 2.7 and tensorflow is imported properly. How can I import tensorflow using python 3 and specify this in the dockerfile