This repo contains setup/teardown files that I used to complete https://github.com/fastai/course22p2 on https://cloud.vast.ai/.
If you have your own device with a good-quality GPU and don't need to rent one on vast.ai, you might still be interested in install.sh, which sets up a jupyter kernel with all the dependencies needed to run the course.
git clone --recurse-submodules https://github.com/AlexChalk/fast-ai-course-setup- Install rsync.
- Create a vast.ai account, add some credit, and then rent an instance at https://cloud.vast.ai/create, selecting the Pytorch (Vast) template.
- (I found that a machine with 1x RTX 3090 or 4060Ti and 100GB of image space was plenty for most of the lessons, although the final lessons require more space as they use larger datasets).
- Copy the direct ssh info and pipe it to this project's setup file, e.g.
pbpaste | ./setup.shorecho '~pasted_content~' | ./setup.sh.- This setup file will copy your working directory to the device you rented, then create a Jupyter kernel called "Python (ML)" with all the dependencies needed to run the notebooks (including miniai).
- The script respects an ignore file called
.setup-ignore. I've preignored some large.pklfiles from the course containing trained models that aren't used across notebooks.
- Access vast.ai's jupyter client, run notebooks on your instance (make sure the "Python (ML)" kernel is selected).
- When you're done, copy your modifications back to your local device, again using the direct ssh info from vast:
pbpaste | ./copy-from.shorecho '~pasted_content~' | ./copy-from.sh. (Similarly to.setup.sh, this respects an ignore script called.copy-from-ignore, but this does not ignore any.pklfiles by default). - Remember to destroy your vast instance!
I added and worked through the notebooks incrementally; this generated miniai as I went rather than copying it all across from the start. By default, this repo instead copies the entire course + miniai for convenience, but you should feel free just to use it for setting up/copying back whatever files you choose instead.