【问题标题】:build a docker image for jupyter notebook in windows在 windows 中为 jupyter notebook 构建一个 docker 镜像
【发布时间】:2019-05-03 04:43:52
【问题描述】:

我想在 windows 中构建一个 docker 镜像,我的 docker 文件是:

FROM jupyter/scipy-notebook

MAINTAINER Jon Krohn <jon@untapt.com>

USER $NB_USER

# install TensorFlow
RUN conda install --quiet --yes 'tensorflow=1.0*'

# install tflearn and keras: 
RUN pip install tflearn==0.3.2
RUN pip install keras==2.0.8

# install NLP packages:
RUN pip install nltk==3.2.4
RUN pip install gensim==2.3.0

# install Reinforcement Learning packages:
RUN pip install gym==0.9.4

但是当我用这个命令构建它时

docker build -t tensorflow-ll-stack .

我收到此错误消息

The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - conda-forge/noarch::seaborn==0.9.0=py_0
  - conda-forge/linux-64::matplotlib==3.0.3=py37_1
failed

SpecsConfigurationConflictError: Requested specs conflict with configured specs.
  requested specs:
    - tensorflow=1.0
  pinned specs:
    - python=3.7
Use 'conda config --show-sources' to look for 'pinned_specs' and 'track_features'
configuration parameters.  Pinned specs may also be defined in the file
/opt/conda/conda-meta/pinned.


The command '/bin/sh -c conda install --quiet --yes 'tensorflow=1.0*'' returned a non-zero code: 1      

感谢您的帮助。

【问题讨论】:

    标签: windows docker jupyter-notebook dockerfile


    【解决方案1】:

    我在 Windows 上设置 docker 映像时遇到了一些类似的问题。对我来说,这是一个 SSL 证书错误,并且在安装之前执行了以下代码。

    conda config --set ssl_verify no
    

    所以对于你的情况,你可以试试这个:

    FROM jupyter/scipy-notebook
    
    MAINTAINER Jon Krohn <jon@untapt.com>
    
    USER $NB_USER
    
    # install TensorFlow
    RUN conda config --set ssl_verify no
    RUN conda install --quiet --yes 'tensorflow=1.0*'
    
    # install tflearn and keras: 
    RUN pip install tflearn==0.3.2
    RUN pip install keras==2.0.8
    
    # install NLP packages:
    RUN pip install nltk==3.2.4
    RUN pip install gensim==2.3.0
    
    # install Reinforcement Learning packages:
    RUN pip install gym==0.9.4
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-17
      • 2021-11-25
      • 2020-10-06
      • 1970-01-01
      • 1970-01-01
      • 2014-05-07
      相关资源
      最近更新 更多