Skip to content

Build Cache [using jupyter-book] #148

Build Cache [using jupyter-book]

Build Cache [using jupyter-book] #148

Workflow file for this run

name: Build Cache [using jupyter-book]
on:
schedule:
# Execute cache weekly at 3am on Monday
- cron: '0 3 * * 1'
workflow_dispatch:
jobs:
cache:
runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon-ubuntu24/disk=large"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Upgrade CUDANN
shell: bash -l {0}
run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cudnn-cuda-12
- name: Setup Anaconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: true
miniconda-version: 'latest'
python-version: "3.12"
environment-file: environment.yml
activate-environment: quantecon
- name: Install jax (and install checks for GPU)
shell: bash -l {0}
run: |
pip install -U "jax[cuda12]"
python --version
python scripts/test-jax-install.py
nvidia-smi
- name: Build HTML
shell: bash -l {0}
run: |
jb build lectures --path-output ./ -W --keep-going
- name: Upload Execution Reports
uses: actions/upload-artifact@v4
if: failure()
with:
name: execution-reports
path: _build/html/reports
- name: Upload "_build" folder (cache)
uses: actions/upload-artifact@v4
with:
name: build-cache
path: _build
include-hidden-files: true