Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Describe how to install CycleGAN from a clean Ubuntu 18.04.1 install
Installing CycleGAN
# Zero : install basic packages :
sudo apt install git luarocks
# FIRST : Install Torch :
git clone ~/torch --recursive
cd ~/torch; bash install-deps;
./ # FAILS
# To fix :
sudo apt-get install -y build-essential gcc g++ curl \
cmake libreadline-dev git-core libqt4-dev libjpeg-dev \
libpng-dev ncurses-dev imagemagick libzmq3-dev gfortran \
unzip gnuplot gnuplot-x11 ipython
# Install dependencies
luarocks install nngraph # FAILS
# Alternatively, Quasimondo tells us to run this instead:
# luarocks --from= install nngraph
# but let's keep it clean and simply use Torch's luarocks version:
sudo ~/torch/install/bin/luarocks install nngraph
sudo ~/torch/install/bin/luarocks install class
# This fails for no good reason : (http_parser.c:2093:18: error: this statement may fall through [-Werror=implicit-fallthrough=])
sudo ~/torch/install/bin/luarocks install # FAILS
/home/nathan/torch/install/bin/luarocks install
DATA_ROOT=./datasets/ae_photos name=style_cezanne_pretrained model=one_direction_test phase=test loadSize=256 fineSize=256 resize_or_crop="scale_width" th test.lua
# = FAILS because
# torch/install/share/lua/5.1/trepl/init.lua:389: module 'cutorch' not found:No LuaRocks module found for cutorch
# Install CUDA
# Make sure this is installed
sudo apt-get install linux-headers-$(uname -r)
# Download and install .deb
# Use tab for version auto-completion
sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/
sudo apt-get update
sudo apt-get install cuda
# Make sure to do post-installation stuff. Add this line to .bashrc
export PATH="/usr/local/cuda-10.0/bin:$PATH"
# Check if active:
systemctl status nvidia-persistenced
# if not, run this:
sudo systemctl enable nvidia-persistenced
# if still not, reboot.
# Do POWER9 stuff
sudo cp /lib/udev/rules.d/40-vm-hotadd.rules /etc/udev/rules.d
# Edit file /etc/udev/rules.d/40-vm-hotadd.rules and comment this line:
# SUBSYSTEM=="memory", ACTION=="add", DEVPATH=="/devices/system/memory/memory[0-9]*", TEST=="state", ATTR{state}="online"
# Reboot system now
# Install Deepo :
# Follow instructions here :
# Install Docker :
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
curl -fsSL | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] \
$(lsb_release -cs) \
sudo apt-get update
sudo apt-get install docker-ce
# Install nvidia-docker
curl -s -L | \
sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L$distribution/nvidia-docker.list | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
# Test
sudo docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi
# Download Deepo:
sudo docker pull ufoym/deepo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment