udacity / CarND-Term1-Starter-Kit

MIT License
495 stars 602 forks source link

Faild to build docker image using Dockerfile #99

Closed atinfinity closed 5 years ago

atinfinity commented 6 years ago

I tried to build docker image using Dockerfile of CarND-Term1-Starter-Kit. https://github.com/udacity/CarND-Term1-Starter-Kit

But, I could not build docker image. Please give me some advice.

System information(host PC)

Steps to reproduce

CPU

$ git clone https://github.com/udacity/CarND-Term1-Starter-Kit.git
$ cd CarND-Term1-Starter-Kit
$ docker build -t udacity/carnd-term1-starter-kit -f Dockerfile.cpu .

GPU

$ git clone https://github.com/udacity/CarND-Term1-Starter-Kit.git
$ cd CarND-Term1-Starter-Kit
$ docker build -t udacity/carnd-term1-starter-kit -f Dockerfile.gpu .

Error message

The following message was displayed.

Traceback (most recent call last):                                       |  14%
  File "/root/miniconda3/envs/carnd-term1/bin/jupyter-nbextension", line 7, in <module>
    from notebook.nbextensions import main
  File "/root/miniconda3/envs/carnd-term1/lib/python3.5/site-packages/notebook/__init__.py", line 25, in <module>
    from .nbextensions import install_nbextension
  File "/root/miniconda3/envs/carnd-term1/lib/python3.5/site-packages/notebook/nbextensions.py", line 23, in <module>
    from jupyter_core.paths import (
ImportError: No module named 'jupyter_core'
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:

    https://github.com/conda/conda/issues
Tsuihao commented 6 years ago

I faced the same issue, I think the reason is conda outage. Add RUN conda update -n base conda -y in the Dockerfile.cpu / Dockerfile.gpu As shown in the following here: https://github.com/Tsuihao/CarND-Term1-Starter-Kit/commit/0687915789f41e4040fe6d9c22f4c66e43a8e766

And it works!

mvirgo commented 5 years ago

We've since updated the conda version in the Dockerfile to avoid this issue, although the solution above should also work.