Bootstrap: docker From: ubuntu:20.04 %post apt-get -y update # Add universe repository (necessary for python3-pip) apt-get -y install software-properties-common add-apt-repository -y -u universe # Install python packages apt-get -y install python3 python3-pip apt-get clean # Install python dependencies pip3 install --no-cache-dir torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version -f $find_links