diff --git a/03_instructional_team/markdown_slides/images/colab_dropdown.png b/03_instructional_team/markdown_slides/images/colab_dropdown.png new file mode 100644 index 000000000..bd835b094 Binary files /dev/null and b/03_instructional_team/markdown_slides/images/colab_dropdown.png differ diff --git a/03_instructional_team/markdown_slides/images/colab_setup.png b/03_instructional_team/markdown_slides/images/colab_setup.png new file mode 100644 index 000000000..a7dfb28e4 Binary files /dev/null and b/03_instructional_team/markdown_slides/images/colab_setup.png differ diff --git a/03_instructional_team/markdown_slides/images/vs_code_ntbk.png b/03_instructional_team/markdown_slides/images/vs_code_ntbk.png new file mode 100644 index 000000000..d3860dd5b Binary files /dev/null and b/03_instructional_team/markdown_slides/images/vs_code_ntbk.png differ diff --git a/SETUP.md b/SETUP.md index c6cc61f1c..9d8287ff2 100644 --- a/SETUP.md +++ b/SETUP.md @@ -1,5 +1,7 @@ # Setup -## Environment Setup Guide + + +## Virtual Environment Setup Guide Before using this repo, make sure you’ve completed the [environment setup guide](https://github.com/UofT-DSI/onboarding/blob/main/environment_setup/README.md), which installs the core tools you’ll need for this module, such as: - Git @@ -7,7 +9,7 @@ Before using this repo, make sure you’ve completed the [environment setup guid - Visual Studio Code - UV -## Necessary Packages +### Necessary Packages The Deep Learning module uses its own isolated environment called `deep-learning-env` so that packages don’t conflict with other projects. We use UV to create this environment, activate it, and install the required packages listed in the module’s `pyproject.toml`. This setup only needs to be done **once per module**, after that, you just activate the environment whenever you want to work in this repo. @@ -35,7 +37,7 @@ Open a terminal (macOS/Linux) or Git Bash (Windows) in this repo, and run the fo uv sync --active ``` -## Environment Usage +### Environment Usage In order to run any code in this repo, you must first activate its environment. - for macOS/Linux: ``` @@ -60,7 +62,33 @@ deactivate > **👉 Remember** > Only one environment can be active at a time. If you switch to a different repo, first deactivate this one (or just close the terminal) and then activate the new repo’s environment. +> +### Environments and Notebooks + +![kernel selection](03_instructional_team/markdown_slides/images/vs_code_ntbk.png) + +To use your virtual environment in a notebook, click the kernel selection dropdown, select `Python Environments`, then click the `deep-learning-env` from the dropdown. Then restart your notebook. + + +## Colab +An alternative to setting up your virtual environment is to instead use Google Colab. Colab is a free, cloud-based Jupyter notebook environment provided by Google that runs entirely in your browser. It requires minimal, just a Google account. Colab provides access to GPUs and TPUs, which can significantly speed up training deep learning models. + +You can access a Colab kernel for your notebooks by installing the Colab extension in VSCode: + +![colab setup guide](03_instructional_team/markdown_slides/images/colab_setup.png) + +Once you have installed this kernel, you can click the kernel dropdown in your notebook, click `Select Another Kernel`, and select `Colab`. You will see a dropdown + +![colab dropdown](03_instructional_team/markdown_slides/images/colab_dropdown.png) + +This will ask you to log into a Google account, simply follow the dropdown. For normal usage, click `Auto-Connect`. Otherwise click `New Colab Server` and select `CPU`,`GPU`, or `TPU`. For this course, using `GPU` may be useful if you have not installed GPU drivers. + +**Pros and Cons** Colab is very convenient as it has many packages pre-installed. However, there are some downsides: +* This does not work offline and requires you to be connected to the internet. +* Colab is limited to notebooks and you cannot utilize it to run scripts. +* This is run on Google's servers, making it unsuitable for applications where data security is important. --- -For questions or issues, please contact the Deep Learning Module learning support team or email courses.dsi@utoronto.ca. \ No newline at end of file + +For questions or issues, please contact the Deep Learning Module learning support team or email courses.dsi@utoronto.ca.