pip安装在构建奇点映像时,如果在%post中运行,则不会看到任何tensorflow
我正在尝试用tf构建一个容器。当def文件pip安装在构建奇点映像时,如果在%post中运行,则不会看到任何tensorflow,pip,singularity-container,Pip,Singularity Container,我正在尝试用tf构建一个容器。当def文件 Bootstrap: docker From: nvidia/cuda:10.1-base %runscript python3 easy_train.py %post apt-get update -y DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ software-properties-common
Bootstrap: docker
From: nvidia/cuda:10.1-base
%runscript
python3 easy_train.py
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
software-properties-common
add-apt-repository universe
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3.8 \
python3-distutils \
python3-pip \
python3-tk \
python3-setuptools
一切正常,以sudo的形式启动shell并运行python3.8-m pip install tensorflow==2.3.1
正常。当我将相同内容添加到%post时,我得到
Could not find a version that satisfies the requirement tensorflow==2.3.1 (from versions: )
No matching distribution found for tensorflow==2.3.1
FATAL: While performing build: while running engine: exit status 1
我怎样才能解决这个问题