Skip to content

Instantly share code, notes, and snippets.

@GilesBathgate
Last active November 20, 2022 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GilesBathgate/03332bae7879f930a087b2cb519997e7 to your computer and use it in GitHub Desktop.
Save GilesBathgate/03332bae7879f930a087b2cb519997e7 to your computer and use it in GitHub Desktop.
Stylegan2-ADA-Pytorch Ubuntu 22.04.01 LTS

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment