pytorch_cu.def.template 476 B

123456789101112131415161718
  1. Bootstrap: docker
  2. From: ubuntu:20.04
  3. %post
  4. apt-get -y update
  5. # Add universe repository (necessary for python3-pip)
  6. apt-get -y install software-properties-common
  7. add-apt-repository -y -u universe
  8. # Install python packages
  9. apt-get -y install python3 python3-pip
  10. apt-get clean
  11. # Install python dependencies
  12. pip3 install --no-cache-dir torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version -f $find_links