diff --git a/SETUP.md b/SETUP.md new file mode 100644 index 000000000..c6cc61f1c --- /dev/null +++ b/SETUP.md @@ -0,0 +1,66 @@ +# Setup +## 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 +- Git Bash (for Windows) +- Visual Studio Code +- UV + +## 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. + +Open a terminal (macOS/Linux) or Git Bash (Windows) in this repo, and run the following commands in order: + +1. Create a virtual environment called `deep-learning-env`: + ``` + uv venv deep-learning-env --python 3.11 + ``` + +2. Activate the environment: + - for macOS/Linux: + ``` + source deep-learning-env/bin/activate + ``` + + - for windows (git bash): + ``` + source deep-learning-env/Scripts/activate + ``` + +3. Install all required packages from the [pyproject.toml](./pyproject.toml) + ```bash + uv sync --active + ``` + +## Environment Usage +In order to run any code in this repo, you must first activate its environment. +- for macOS/Linux: + ``` + source deep-learning-env/bin/activate + ``` + +- for windows (git bash): + ``` + source deep-learning-env/Scripts/activate + ``` + +When the environment is active, your terminal prompt will change to show: +``` +(deep-learning-env) $ +``` +This is your **visual cue** that you’re working inside the right environment. + +When you’re finished, you can deactivate it with: +```bash +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. + +--- + +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 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..97292d176 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,21 @@ +[project] +name = "deep-learning-env" +version = "0.1.0" +requires-python = ">=3.11" +dependencies = [ + "ipykernel>=6.30.1", + "h5py>=3.14.0", + "ipython>=9.5.0", + "keras>=3.11.3", + "matplotlib>=3.10.6", + "numpy>=2.3.3", + "plotly>=6.3.0", + "scikit-image>=0.25.2", + "scikit-learn>=1.7.2", + "seaborn>=0.13.2", + "sequence>=0.8.0", + "tensorflow>=2.20.0", + "torch>=2.8.0", + "torchvision>=0.23.0", + "umap>=0.1.1", +]