Skip to content

Commit

Permalink
use anaconda env
Browse files Browse the repository at this point in the history
  • Loading branch information
kp992 committed May 24, 2024
1 parent 15b4a0a commit 2ff9298
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,28 @@ name: Build Project [using jupyter-book]
on: [pull_request]
jobs:
preview:
runs-on: ubuntu-latest-gpu
runs-on: ubuntu-22.04-gpu
container:
image: docker://mmcky/quantecon-lecture-python:cuda-12.3.1-anaconda-2024-02-py311
image: docker://nvidia/cuda:12.4.1-devel-ubuntu22.04
options: --gpus all
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Anaconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: true
miniconda-version: 'latest'
python-version: "3.11"
environment-file: environment.yml
activate-environment: quantecon
- name: Install JAX[CUDA] and Numpyro[CUDA]
shell: bash -l {0}
run: |
pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
pip install --upgrade "numpyro[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
- name: Check nvidia drivers
shell: bash -l {0}
run: |
Expand All @@ -32,18 +46,18 @@ jobs:
# name: build-cache
# path: _build
# Build Assets (Download Notebooks and PDF via LaTeX)
- name: Build Download Notebooks (sphinx-tojupyter)
shell: bash -l {0}
run: |
jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter -n -W --keep-going
mkdir -p _build/html/_notebooks
cp -u _build/jupyter/*.ipynb _build/html/_notebooks
- name: Build PDF from LaTeX
shell: bash -l {0}
run: |
jb build lectures --builder pdflatex --path-output ./ -n -W --keep-going
mkdir _build/html/_pdf
cp -u _build/latex/*.pdf _build/html/_pdf
# - name: Build Download Notebooks (sphinx-tojupyter)
# shell: bash -l {0}
# run: |
# jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter -n -W --keep-going
# mkdir -p _build/html/_notebooks
# cp -u _build/jupyter/*.ipynb _build/html/_notebooks
# - name: Build PDF from LaTeX
# shell: bash -l {0}
# run: |
# jb build lectures --builder pdflatex --path-output ./ -n -W --keep-going
# mkdir _build/html/_pdf
# cp -u _build/latex/*.pdf _build/html/_pdf
# Final Build of HTML
- name: Build HTML
shell: bash -l {0}
Expand Down

0 comments on commit 2ff9298

Please sign in to comment.