Cycle GAN on Docker

After I downloaded the data, I kept getting an assertion error, stating that data0 was not a valid directory. By default, the notebook looks for data0 in the home directory. However, if you used @Matthew’s excellent Docker container and installed it via his setup instructions, then you would get the same error.

The issue is that when the container is launched, its filesystem is instantiated with only two directories in home (code and data). This means that either you have to create the directory and perform the wget command (to fetch the data), via the terminal inside of Jupyter Notebook, or make the following adjustment when you launch your container:

Replace Step 3 in @Matthew’s setup instructions with the following two lines of code:


docker run --runtime=nvidia --init -it -p 8888:8888 -v $CODE:/code -v DATA0=~/data0 -v $DATA:/data -w="/code/fastai" mwksmith/fastai

Doing so will create a third directory (data0) that is shared by your local filesystem and the container. It’s the more flexible of the two solutions.