Docker Community Forums

Share and learn in the Docker community.

Strange error while trying to build new TF docker image on Ubuntu


11:33 AM (31 minutes ago)


Here is what happens when I try to build new TF image:

pavel@ALABAMA:~$ docker image build -t tensorflow_as:latest .
error checking context: 'can't stat '/home/pavel/.cache/dconf''.
pavel@ALABAMA:~$ more Dockerfile
FROM tensorflow/tensorflow:latest-gpu
RUN apt-get install -y libsm6 libxext6 libxrender-dev && pip install scikit-learn opencv-python imutils

Any suggestions/comments ?


To clarify, I mean that taking the NVIDIA partial of the TF docker file:

Pick up some TF dependencies

RUN apt-get update && apt-get install -y --no-install-recommends \

    build-essential \                       

    cuda-command-line-tools-9-0 \                       

    cuda-cublas-9-0 \                       

    cuda-cufft-9-0 \                       

    cuda-curand-9-0 \                       

    cuda-cusolver-9-0 \                       

    cuda-cusparse-9-0 \                       

    libcudnn7= \                       

    libnccl2=2.2.13-1+cuda9.0 \                       

    libfreetype6-dev \                       

    libhdf5-serial-dev \                       

    libpng12-dev \                       

    libzmq3-dev \                       

    pkg-config \                       

    software-properties-common \                       

    unzip \                       

    && \                       

apt-get clean && \                       

rm -rf /var/lib/apt/lists/*                       

RUN apt-get update && \

    apt-get install nvinfer-runtime-trt-repo-ubuntu1604-4.0.1-ga-cuda9.0 && \                       

    apt-get update && \                       

    apt-get install libnvinfer4=4.1.2-1+cuda9.0

results in errors (unable to locate package), timeout or the like. So even if I wanted to make the python3.6 version myself, I can not :slight_smile:

Trying to use FROM tensorflow/tensorflow and python3 will not work without a virtual environment… as non docker guru, I think many in the community would appreciate it

Hi lewish95,

Franky speaking I didn’t understand why should I install all the packages you recommend.
When I run tensorflow/tensorflow:latest-gpu, it works nice. The only problem - I need to install (inside docker container) the following packages libsm6, libxext6, libxrender-dev, scikit-l in order to run my code. That’s why I decided to build new image with these packages already installed.

Are you aware of the meaning of the error message that appears when I try to build.



Problem resoled.
I’ve just created new dockerfiles, moved there Dockerfile, changed active directory for dockerfiles and run build command.