Dockerfile corrupted, remove tensorflow from the parent image

Hello,

If I create a container from a image created with a Dockerfile containing this line only:

FROM nvcr.io/nvidia/tensorflow:23.03-tf1-py3

then, if I run python then import tensorflow inside the container, no problem, everything works.

But I create the container with this Dockerfile instead:


FROM nvcr.io/nvidia/tensorflow:23.03-tf1-py3

RUN ["/bin/bash", "-c", "apt-get update"]

RUN ["/bin/bash", "-c", "apt-get -y install openssh-server"]

RUN ["/bin/bash", "-c", "wget -P /workspace https://repo.anaconda.com/archive/Anaconda3-2023.03-Linux-x86_64.sh "]

RUN /bin/bash /workspace/Anaconda3-2023.03-Linux-x86_64.sh -b -p /root/anaconda3

RUN echo 'export PATH=/root/anaconda3/bin:$PATH' >> ~/.bashrc

RUN /root/anaconda3/bin/conda init bash

Then I get

NameError: name ‘tensorflow’ is not defined

Any idea of what is “removing” tensorflow from the parent image (nvcr.io/nvidia/tensorflow:23.03-tf1-py3) ?

Regards

Aymeric