64 lines
1.9 KiB
Bash
64 lines
1.9 KiB
Bash
#!/bin/bash
|
|
|
|
# a simple script to setup a linode GPU instance for superject abstraction
|
|
# to be run on a freshly created Debian-10 system
|
|
|
|
# local setup
|
|
# - add IP4 to ~/.ssh/config
|
|
# - copy ssh keys via -> ssh-copy-id -i ~/.ssh/id_rsa root@grapheme
|
|
# - copy scripts -> scp *.sh grapheme:
|
|
# - sshfs grapheme:/tmp/neural /Volumes/
|
|
# -
|
|
|
|
# on grapheme
|
|
|
|
echo "listen to my voice...\n"
|
|
|
|
cd /root
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
# set new apt sources
|
|
|
|
echo "on the count of 3,2,1...\n"
|
|
|
|
cat << _EOL_ > /etc/apt/sources.list
|
|
deb http://mirrors.linode.com/debian/ unstable main contrib non-free
|
|
deb-src http://mirrors.linode.com/debian/ unstable main contrib non-free
|
|
|
|
deb http://mirrors.linode.com/debian/ buster-backports main contrib non-free
|
|
deb-src http://mirrors.linode.com/debian/ buster-backports main contrib non-free
|
|
|
|
_EOL_
|
|
|
|
apt-get update
|
|
apt-get upgrade -y
|
|
|
|
apt-get install git nvidia-driver firmware-misc-nonfree python3-pip emacs-nox nvidia-cuda-dev nvidia-cuda-toolkit nvtop screen rsync -y &> /dev/null | echo 'Installing packaged gunk...'
|
|
|
|
apt purge linux-image-4.19.0-13-amd64
|
|
|
|
apt-get upgrade -y
|
|
|
|
# setup nvidia driver
|
|
|
|
echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf
|
|
echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf
|
|
|
|
# install the GANs
|
|
|
|
echo "partial attention..."
|
|
|
|
git clone https://github.com/NVlabs/stylegan2-ada-pytorch
|
|
|
|
pip3 install torch==1.7.1 pycuda psutil Pillow scipy click requests tqdm pyspng ninja tensorboard imageio imageio-ffmpeg==0.4.3
|
|
|
|
#pip3 install stylegan2_pytorch &> /dev/null | echo 'Installing styleGAN2...'
|
|
#pip3 install lightweight-gan &> /dev/null | echo 'Installing lightweight GAN...'
|
|
#pip3 install deep-daze &> /dev/null | echo 'Installing deep-daze...'
|
|
#pip3 install big-sleep &> /dev/null | echo 'Installing big-sleep...'
|
|
|
|
mkdir -p /tmp/neural
|
|
|
|
echo "you are now asleep."
|
|
|
|
# make new users if reqd?
|