diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c639b9d..e379b2d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,10 +31,16 @@ jobs: with: python-version: '3.11' - - name: Install dependencies + - name: Setup Conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + python-version: '3.11' + + - name: Install book building dependencies run: | - python -m pip install --upgrade pip - pip install -r requirements.txt + conda env create -f requirements-book.yml + conda activate jupyter-book - name: Build the book run: | diff --git a/README.md b/README.md index 00af1c5..5b2d95e 100644 --- a/README.md +++ b/README.md @@ -76,4 +76,28 @@ Remember: Everyone learns differently. If this approach doesn't click with you, ### (...) ### 2. Here is how this course is structured and intended to be used. -This is important because if you go how it is intended you'll get the maximum amount of value out of this course. \ No newline at end of file +This is important because if you go how it is intended you'll get the maximum amount of value out of this course. + +## Installation 📦 + +There are two ways to use this repository: + +1. **To run the code examples locally:** ```bash + pip install -r requirements.txt ``` + This will install all the necessary ML/DL libraries needed to run the example code. + +2. **To build the book locally:** ```bash + # Create and activate conda environment with book-building dependencies + conda env create -f requirements-book.yml + conda activate jupyter-book + + # Build the book + jupyter-book build . --all` + +The separation provides several benefits: +1. Faster deployments since only necessary packages are installed +2. Clearer separation of concerns between book building and code running +3. Conda environment for book building helps avoid dependency conflicts +4. Users can choose to install only what they need + +You might also want to add a `.gitignore` entry for the conda environment: \ No newline at end of file diff --git a/requirements-book.yml b/requirements-book.yml new file mode 100644 index 0000000..e51b6ed --- /dev/null +++ b/requirements-book.yml @@ -0,0 +1,14 @@ +name: jupyter-book +channels: + - conda-forge +dependencies: + - python=3.11 + - jupyter-book>=0.13.0 + - ghp-import + - sphinx>=4.0 + - sphinx-book-theme + - myst-nb + - myst-parser + - nbformat + - nbconvert + - linkify-it-py \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 385a55e..7f7335b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,16 +1,10 @@ -jupyter-book>=0.13.0 -ghp-import -sphinx>=4.0 -sphinx-book-theme -myst-nb -myst-parser -nbformat -nbconvert -linkify-it-py - -python==3.11.10 -matplotlib==3.9.2 +# Core ML/DL libraries +torch==2.5.1 numpy==2.1.3 pandas==2.2.3 -requests==2.32.3 -torch==2.5.1 \ No newline at end of file + +# Visualization +matplotlib==3.9.2 + +# Other utilities +requests==2.32.3 \ No newline at end of file