udacity / CarND-Term1-Starter-Kit

MIT License
495 stars 602 forks source link

Error building image using the Dockerfile.gpu. #92

Closed stoicio closed 6 years ago

stoicio commented 6 years ago

I had clone this repo locally and i am trying to build the Docker image using the Dockerfile.gpu file.

With the command docker build -f Dockerfile.gpu -t carnd:gpu . the build process fails with the following error

jupyter-1.0.0- 100% |###############################| Time: 0:00:00   1.75 MB/s
Extracting packages ...
[      COMPLETE      ]|##################################################| 100%
Linking packages ...
Traceback (most recent call last):##################                     |  58%
  File "/root/miniconda3/envs/carnd-term1/bin/jupyter-nbextension", line 4, in <module>
    import notebook.nbextensions
  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

Current conda install:

               platform : linux-64
          conda version : 4.2.12
       conda is private : False
      conda-env version : 4.2.12
    conda-build version : not installed
         python version : 3.5.2.final.0
       requests version : 2.11.1
       root environment : /root/miniconda3  (writable)
    default environment : /root/miniconda3
       envs directories : /root/miniconda3/envs
          package cache : /root/miniconda3/pkgs
           channel URLs : https://repo.continuum.io/pkgs/free/linux-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/pro/linux-64
                          https://repo.continuum.io/pkgs/pro/noarch
            config file : None
           offline mode : False

`$ /root/miniconda3/bin/conda-env create -f=environment.yml --name carnd-term1 --debug -v -v`

    Traceback (most recent call last):
      File "/root/miniconda3/lib/python3.5/site-packages/conda/exceptions.py", line 479, in conda_exception_handler
        return_value = func(*args, **kwargs)
      File "/root/miniconda3/lib/python3.5/site-packages/conda_env/cli/main_create.py", line 111, in execute
        installer.install(prefix, pkg_specs, args, env)
      File "/root/miniconda3/lib/python3.5/site-packages/conda_env/installers/conda.py", line 33, in install
        plan.execute_actions(actions, index, verbose=not args.quiet)
      File "/root/miniconda3/lib/python3.5/site-packages/conda/plan.py", line 643, in execute_actions
        inst.execute_instructions(plan, index, verbose)
      File "/root/miniconda3/lib/python3.5/site-packages/conda/instructions.py", line 134, in execute_instructions
        cmd(state, arg)
      File "/root/miniconda3/lib/python3.5/site-packages/conda/instructions.py", line 78, in LINK_CMD
        link(state['prefix'], dist, lt, index=state['index'])
      File "/root/miniconda3/lib/python3.5/site-packages/conda/install.py", line 993, in link
        raise LinkError("Error: post-link failed for: %s" % dist)
    conda.exceptions.LinkError: Link error: Error: post-link failed for: menpo::widgetsnbextension-1.2.3-py35_1 

Any idea on how I can fix this ?

citlaligm commented 6 years ago

I put your question in the Forum in case someone has the same problem. https://discussions.udacity.com/t/error-building-image-using-the-dockerfile-gpu/610580

I also was getting the same problem. What I did was to modify the Dockerfile.gpu to download the latest version of Miniconda.

mvirgo commented 6 years ago

Sounds like @citlaligm solved this - thanks Graciela!

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: Tsuihao@0687915

And it works!