diff --git a/installation.md b/installation.md index 4baf55d..4127ce6 100644 --- a/installation.md +++ b/installation.md @@ -1,11 +1,16 @@ # MiniTorch Module 3 Installation -MiniTorch requires Python 3.8 or higher. To check your version of Python, run: +MiniTorch requires Python 3.11. To check your version of Python, run: ```bash >>> python --version ``` +If you don't have Python 3.11, install it before proceeding: +- **Mac**: `brew install python@3.11` +- **Ubuntu/Debian**: `sudo apt install python3.11` +- **Windows**: Download from python.org + We recommend creating a global MiniTorch workspace directory that you will use for all modules: @@ -19,14 +24,14 @@ We highly recommend setting up a *virtual environment*. The virtual environment **Option 1: Anaconda (Recommended)** ```bash ->>> conda create --name minitorch python # Run only once +>>> conda create --name minitorch python=3.11 # Run only once >>> conda activate minitorch ->>> conda install llvmlite # For optimization +>>> conda install llvmlite # For optimization ``` **Option 2: Venv** ```bash ->>> python -m venv venv # Run only once +>>> python3.11 -m venv venv # Run only once (requires Python 3.11) >>> source venv/bin/activate ``` @@ -41,6 +46,14 @@ Each assignment is distributed through a Git repo. Once you accept the assignmen >>> cd {{ASSIGNMENT}} ``` +## Installation + +Install all packages in your virtual environment: + +```bash +>>> python -m pip install -e ".[dev,extra]" +``` + ## Syncing Previous Module Files Module 3 requires files from Module 0, Module 1, and Module 2. Sync them using: diff --git a/pyproject.toml b/pyproject.toml index 6e3e566..016a7ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,11 +6,11 @@ build-backend = "hatchling.build" name = "minitorch" version = "0.5" description = "A minimal deep learning library for educational purposes" -requires-python = ">=3.8" +requires-python = ">=3.8,<3.12" dependencies = [ "colorama==0.4.6", "hypothesis==6.138.2", - "numba-cuda[cu12]>=0.4.0", ## cu12 is for CUDA 12.0 cu13 is for CUDA 13.0 + "numba>=0.61.2", "numpy<2.0", "pytest==8.4.1", "pytest-env==1.1.5", @@ -21,6 +21,9 @@ dependencies = [ dev = [ "pre-commit==4.3.0", ] +cuda = [ + "numba-cuda[cu12]>=0.4.0", +] extra = [ "datasets==2.4.0", "embeddings==0.0.8", @@ -30,7 +33,7 @@ extra = [ "python-mnist", "streamlit==1.48.1", "streamlit-ace", - "torch==2.8.0", + "torch>=2.9.0", "watchdog==1.0.2", "altair==4.2.2", ]