0

我正在尝试使用配方制作新的奇点,但它一直失败。我将它链接到我的 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
4

1 回答 1

0

好吧,在看了很多其他例子之后终于让它工作了

这是它的最终配方文件

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"

于 2019-12-26T02:51:46.407 回答