尝试安装TF2时,奇异性会不断出现错误

时间:2019-12-24 03:01:29

标签: docker tensorflow singularity-container

我正在尝试使用配方制作新的奇点,但是它一直失败。我将它链接到我的github,因此当我提交它时,它将自动生成并编译,以便该部分正常工作。但是,它一直给我这样的错误。

 pip3 install -U keras tensorflow-gpu/bin/sh: 2: pip3: not found
 ABORT: Aborting with RETVAL=255Image failed to build: build end 80 seconds.Return value of 1.End Time: Tue Dec 24 02:52:44 UTC 2019.

我尝试了各种方法,但看不到使它正常工作。这是我的配方文件,我确定这是有问题的。

Bootstrap: docker
From: tensorflow/tensorflow:latest-gpu-jupyter

%runscript
    exec echo "Tensorflow GPU container"

%files

%environment
    export SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"
    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8

%labels

%post

    pip3 install -U keras tensorflow-gpu
    pip3 install boto3
    pip3 install awscli
    pip3 install opencv-contrib-python
    pip3 install tensorlayer
    pip3 install click
    pip3 install tqdm
    pip3 install easydict
    pip3 install autopep8
    pip3 install jupyter_contrib_nbextensions && jupyter contrib nbextension install
    pip3 install Pillow
    pip3 install numpy
    pip3 install Pillow
    pip3 install matplotlib
    apt-get update
    apt-get -y install python3-tk
    apt-get install -y libsm6 libxext6

哦,我将其发布到https://singularity-hub.org网站

这是实际的帖子 https://singularity-hub.org/collections/3942

更新

这可行。但是我还需要其他库。如何安装它们?

Bootstrap: docker
From: tensorflow/tensorflow:latest-gpu-jupyter

%runscript
    exec echo "Tensorflow GPU container"

%files

%environment
    export SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"
    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8

%labels

%post
    apt-get update
    apt-get install python-pip
    apt-get -y install python3-tk
    apt-get install -y libsm6 libxext6

1 个答案:

答案 0 :(得分:0)

在查看了许多其他示例之后,Ok终于使它工作了

这是它的最终配方文件

Bootstrap: docker
From: tensorflow/tensorflow:2.0.0-gpu-py3

%post
    apt-get update && apt-get install -y --no-install-recommends \
        curl \
        unzip \
        git \
        openssl \
        ca-certificates \
        protobuf-compiler \
        && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

    /usr/local/bin/pip3 --no-cache-dir install \
        wheel \
        Pillow \
        opencv-python \
        matplotlib \
        numpy \
        pandas \
        scipy \
        sklearn \
        tqdm \
        argparse \
        boto3 \
        mtcnn \
        Cython \
        contextlib2 \
        lxml \
        easydict \
        kaggle \
        seaborn \
        tensorflow-addons \
        tensorflow-datasets \
        jupyter


%environment
    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8
    export SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"