From fa6ce7b5d121b7d6fde9169e88be37b8dd46e337 Mon Sep 17 00:00:00 2001 From: mmcky Date: Wed, 12 Nov 2025 14:11:23 +1100 Subject: [PATCH 1/4] Remove PyTorch and Pyro-PPL, switch to GitHub-hosted runners with CPU-only JAX --- .github/workflows/ci.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80e4d9a83..c263ce654 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: type: string jobs: preview: - runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/disk=large" + runs-on: ubuntu-latest env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} @@ -28,17 +28,12 @@ jobs: python-version: "3.13" environment-file: environment.yml activate-environment: quantecon - - name: Install JAX, Numpyro, PyTorch + - name: Install JAX and Numpyro (CPU-only) shell: bash -l {0} run: | - # pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121 - # pip install pyro-ppl - pip install "jax[cuda12-local]==0.6.2" - pip install numpyro pyro-ppl + pip install -U jax + pip install numpyro python scripts/test-jax-install.py - - name: Check nvidia Drivers - shell: bash -l {0} - run: nvidia-smi - name: Display Conda Environment Versions shell: bash -l {0} run: conda list From 5cce51e957ec5d432d5772b1feff0262085cd69f Mon Sep 17 00:00:00 2001 From: mmcky Date: Wed, 12 Nov 2025 14:24:32 +1100 Subject: [PATCH 2/4] Disable build cache for full test run --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c263ce654..b750409fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,13 +40,13 @@ jobs: - name: Display Pip Versions shell: bash -l {0} run: pip list - - name: Download "build" folder (cache) - uses: dawidd6/action-download-artifact@v11 - with: - workflow: cache.yml - branch: main - name: build-cache - path: _build + # - name: Download "build" folder (cache) + # uses: dawidd6/action-download-artifact@v11 + # with: + # workflow: cache.yml + # branch: main + # name: build-cache + # path: _build # Build Assets (Download Notebooks and PDF via LaTeX) - name: Build Download Notebooks (sphinx-tojupyter) shell: bash -l {0} From f9b7c4886b7de48f021c598a608585fcfa705e24 Mon Sep 17 00:00:00 2001 From: mmcky Date: Wed, 12 Nov 2025 15:22:12 +1100 Subject: [PATCH 3/4] Add comprehensive LaTeX dependencies for PDF build --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b750409fd..a98c695ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,19 @@ jobs: pip install -U jax pip install numpyro python scripts/test-jax-install.py + - name: Install LaTeX dependencies + run: | + sudo apt-get -qq update + sudo apt-get install -y \ + texlive-latex-recommended \ + texlive-latex-extra \ + texlive-fonts-recommended \ + texlive-fonts-extra \ + texlive-xetex \ + latexmk \ + xindy \ + dvipng \ + cm-super - name: Display Conda Environment Versions shell: bash -l {0} run: conda list From ae15f96415c2f5e7848534c44fa66a686c5241e6 Mon Sep 17 00:00:00 2001 From: mmcky Date: Wed, 12 Nov 2025 21:54:03 +1100 Subject: [PATCH 4/4] Fix Netlify CLI permissions issue on GitHub-hosted runners Create ~/.config/netlify directory with proper permissions before running Netlify CLI to prevent EACCES errors. This issue occurs because the CLI is installed globally with sudo but runs as the regular user, requiring write access to the config directory. --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a98c695ee..cc1baa235 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,6 +103,9 @@ jobs: sudo apt-get update sudo apt-get install -y nodejs npm sudo npm install -g netlify-cli + # Create Netlify config directory with proper permissions + mkdir -p ~/.config/netlify + chmod 755 ~/.config/netlify - name: Detect Changed Lecture Files id: detect-changes shell: bash -l {0}