THE ULTIMATE STYLEGAN2 DOCKER SETUP GUIDE FOR ARTISTS

Опубликовано: 24 Июль 2026
на канале: cyremur
3,817
147

A comprehensive step-by-step guide for going from an inert computer to running Stylegan2 on linux.


Business Inquiries: [email protected]
Follow me on Instagram:   / cyremur  
Support this channel:   / cyremur  


TUTORIAL WRITEUP AND OVERVIEW

00:00 Intro Skit

01:32 Tutorial Overview and Storytime

05:57 Preparing a USB Installation Stick
Ubuntu Download: https://ubuntu.com/#download
Rufus Download: https://rufus.ie/
execute Rufus to copy the Ubuntu image onto a USB

09:01 Installing Ubuntu
how to boot from USB
fixing freeze at bionic beaver logo with nomodeset
partitioning the hard drive
going through installation menu

15:01 Fixing Startup and Drivers
fixing login loop with nomodeset
updating nvidia drivers:
sudo ubuntu-drivers install

17:11 Installing Docker
updating ubuntu
sudo apt update
sudo apt upgrade
installing docker
sudo apt install docker.io
testing docker
sudo docker run hello-world
docker postinstall access right management
(https://docs.docker.com/engine/instal...)
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
docker run hello-world
installing curl
sudo apt install curl
installing nvidia-container-toolkit
(https://github.com/NVIDIA/nvidia-dock...)
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docke... | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docke... | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker
testing gpu access in docker
docker run --gpus all nvidia-smi

21:49 Running Stylegan2
downloading (cloning) stylegan2 code
git clone https://github.com/NVlabs/stylegan2
going into stylegan2 directory and building the docker image
cd stylegan2
docker build . -t stylegan2
starting the docker container
docker run --gpus all -v ~:/home -u $(id -u):$(id -g) -it stylegan2 bash
going into stylegan2 folder and rendering
cd /home/stylegan2
python run_generator.py generate-images --network=gdrive:networks/stylegan2-ffhq-config-f.pkl \
--seeds=6600-6625 --truncation-psi=0.5
(https://github.com/NVlabs/stylegan2#u...)

26:05 Optional Macros
add alias to .bashrc (copy paste the next three lines at the end of .bashrc)
function ndocker () {
docker run --gpus all -v ~:/home -u $(id -u):$(id -g) -it $1 bash
}
render images from the abstract
python run_generator.py generate-images --network=gdrive:networks/stylegan2-ffhq-config-f.pkl \
--seeds=66,230,389,1518 --truncation-psi=1.0

29:48 Outro and Future Plans
future video ideas (please leave a comment what you want to see most)
dataset preparation / training stylegan2 on custom images -    • THE ULTIMATE GUIDE TO STYLEGAN2 CUSTOM TRA...  
rendering visuals from stylegan2
pbaylies fork of stylegan2 (https://github.com/pbaylies/stylegan2)
dcgan throwback (https://github.com/carpedm20/DCGAN-te...)