Skip to content

Instantly share code, notes, and snippets.

@yf225
Last active August 13, 2018 20:22
Show Gist options
  • Select an option

  • Save yf225/a8088757ce8e09ba3d858fd7f0985d42 to your computer and use it in GitHub Desktop.

Select an option

Save yf225/a8088757ce8e09ba3d858fd7f0985d42 to your computer and use it in GitHub Desktop.
sudo apt-get update
sudo apt-get install -y --no-install-recommends unzip p7zip-full sox libsox-dev libsox-fmt-all
# pillow >= 4.2 will throw error when trying to write mode RGBA as JPEG,
# this is a workaround to the issue.
conda install -y sphinx pandas pillow=4.1.1
pip install sphinx-gallery sphinx_rtd_theme tqdm matplotlib ipython
git clone https://github.com/pytorch/vision --quiet
pushd vision
pip install . --no-deps # We don't want it to install the stock PyTorch version from pip
popd
# Download dataset for beginner_source/dcgan_faces_tutorial.py
curl https://s3.amazonaws.com/pytorch-datasets/img_align_celeba.zip --output img_align_celeba.zip
sudo mkdir -p /home/ubuntu/facebook/datasets/celeba
sudo chmod -R 0777 /home/ubuntu/facebook/datasets/celeba
unzip img_align_celeba.zip -d /home/ubuntu/facebook/datasets/celeba > null
# To fix the "_tkinter.TclError: no display name and no $DISPLAY environment variable" error, do the following in the script:
# import matplotlib
# matplotlib.use('Agg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment