If not already installed, install Nvidia Driver,
https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html
and CUDA toolkit
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
check installation with:
nvcc -V
Stylegan2 requires pytorch 1.7.1 which only works with python 3.7/3.8
Use deadsnakes ppa for python3.8:
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
sudo apt install python3.8 python3.8-distutils python3.8-dev
If using a virtualenv (recommended)
virtualenv .env --prompt=stylegan2-ada-pytorch -p python3.8
use the following requirements.txt
--extra-index-url https://download.pytorch.org/whl/cu110
torch==1.7.1+cu110
torchvision==0.8.2+cu110
torchaudio==0.7.2
click
requests
tqdm
ninja
psutil
scipy
tensorboard
imageio
imageio-ffmpeg
Install the requirements:
pip install -r requirements.txt