Skip to content

Commit 4b32d03

Browse files
authored
ENH: use quantecon custom docker (#256)
* ENH: use quantecon custom docker * remove anaconda setup * update tag name * remove latex and anaconda setup * Upgrade netlify to v2 * Migrate cache, preview and publish to use qe docker * add simple execution change * Revert "add simple execution change" This reverts commit ed32a2c.
1 parent 2598f2e commit 4b32d03

File tree

3 files changed

+10
-88
lines changed

3 files changed

+10
-88
lines changed

.github/workflows/cache.yml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,18 @@ jobs:
2727
needs: deploy-runner
2828
runs-on: [self-hosted, cml-gpu]
2929
container:
30-
image: docker://nvidia/cuda:11.2.1-devel-ubuntu20.04
30+
image: docker://mmcky/quantecon-lecture-python:py39-anaconda-2022-10
3131
options: --gpus all
3232
steps:
3333
- uses: actions/checkout@v3
3434
with:
3535
ref: ${{ github.event.pull_request.head.sha }}
36-
# Install LaTeX (Support for matplotlib)
37-
- name: Install latex dependencies
38-
shell: bash -l {0}
39-
run: |
40-
apt-get -qq update
41-
export DEBIAN_FRONTEND=noninteractive
42-
apt-get install -y tzdata
43-
apt-get install -y \
44-
texlive-latex-recommended \
45-
texlive-latex-extra \
46-
texlive-fonts-recommended \
47-
texlive-fonts-extra \
48-
texlive-xetex \
49-
latexmk \
50-
xindy \
51-
dvipng \
52-
ghostscript \
53-
cm-super
54-
- name: Setup Anaconda
55-
uses: conda-incubator/setup-miniconda@v2
56-
with:
57-
auto-update-conda: true
58-
auto-activate-base: true
59-
miniconda-version: 'latest'
60-
python-version: 3.9
61-
environment-file: environment.yml
62-
activate-environment: quantecon
36+
# Install Hardware Dependant Libraries
6337
- name: Install Jax and Upgrade CUDA
6438
shell: bash -l {0}
6539
run: |
6640
pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
41+
pip install --upgrade "numpyro[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
6742
nvidia-smi
6843
- name: Build HTML
6944
shell: bash -l {0}

.github/workflows/ci.yml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,43 +24,18 @@ jobs:
2424
needs: deploy-runner
2525
runs-on: [self-hosted, cml-gpu]
2626
container:
27-
image: docker://nvidia/cuda:11.2.1-devel-ubuntu20.04
27+
image: docker://mmcky/quantecon-lecture-python:py39-anaconda-2022-10
2828
options: --gpus all
2929
steps:
3030
- uses: actions/checkout@v3
3131
with:
3232
ref: ${{ github.event.pull_request.head.sha }}
33-
# Install LaTeX (Support for matplotlib and PDF builds)
34-
- name: Install latex dependencies
35-
shell: bash -l {0}
36-
run: |
37-
apt-get -qq update
38-
export DEBIAN_FRONTEND=noninteractive
39-
apt-get install -y tzdata
40-
apt-get install -y \
41-
texlive-latex-recommended \
42-
texlive-latex-extra \
43-
texlive-fonts-recommended \
44-
texlive-fonts-extra \
45-
texlive-xetex \
46-
latexmk \
47-
xindy \
48-
dvipng \
49-
ghostscript \
50-
cm-super
51-
- name: Setup Anaconda
52-
uses: conda-incubator/setup-miniconda@v2
53-
with:
54-
auto-update-conda: true
55-
auto-activate-base: true
56-
miniconda-version: 'latest'
57-
python-version: 3.9
58-
environment-file: environment.yml
59-
activate-environment: quantecon
33+
# Install Hardware Dependant Libraries
6034
- name: Install Jax and Upgrade CUDA
6135
shell: bash -l {0}
6236
run: |
6337
pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
38+
pip install --upgrade "numpyro[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
6439
nvidia-smi
6540
- name: Display Conda Environment Versions
6641
shell: bash -l {0}
@@ -100,7 +75,7 @@ jobs:
10075
name: execution-reports
10176
path: _build/html/reports
10277
- name: Preview Deploy to Netlify
103-
uses: nwtgck/actions-netlify@v1.1
78+
uses: nwtgck/actions-netlify@v2
10479
with:
10580
publish-dir: '_build/html/'
10681
production-branch: main

.github/workflows/publish.yml

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -28,45 +28,17 @@ jobs:
2828
needs: deploy-runner
2929
runs-on: [self-hosted, cml-gpu]
3030
container:
31-
image: docker://nvidia/cuda:11.2.1-devel-ubuntu20.04
31+
image: docker://mmcky/quantecon-lecture-python:py39-anaconda-2022-10
3232
options: --gpus all
3333
steps:
3434
- name: Checkout
3535
uses: actions/checkout@v3
36-
# Install LaTeX (Support for matplotlib and PDF builds)
37-
- name: Install latex dependencies
38-
shell: bash -l {0}
39-
run: |
40-
apt-get -qq update
41-
export DEBIAN_FRONTEND=noninteractive
42-
apt-get install -y tzdata
43-
apt-get install -y \
44-
texlive-latex-recommended \
45-
texlive-latex-extra \
46-
texlive-fonts-recommended \
47-
texlive-fonts-extra \
48-
texlive-xetex \
49-
latexmk \
50-
xindy \
51-
dvipng \
52-
ghostscript \
53-
cm-super
54-
- name: Install Git
55-
shell: bash -l {0}
56-
run: apt-get install -y git
57-
- name: Setup Anaconda
58-
uses: conda-incubator/setup-miniconda@v2
59-
with:
60-
auto-update-conda: true
61-
auto-activate-base: true
62-
miniconda-version: 'latest'
63-
python-version: 3.9
64-
environment-file: environment.yml
65-
activate-environment: quantecon
36+
# Install Hardware Dependant Libraries
6637
- name: Install Jax and Upgrade CUDA
6738
shell: bash -l {0}
6839
run: |
6940
pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
41+
pip install --upgrade "numpyro[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
7042
nvidia-smi
7143
- name: Display Conda Environment Versions
7244
shell: bash -l {0}

0 commit comments

Comments
 (0)