Skip to content

Commit c995915

Browse files
authored
MAINT: use Github based GPU instance (#181)
* MAINT: use Github based GPU instance * TMP: disable build cache * update status page * TST: remove docker layer and test locally * try building html only and add numpyro * try cuda_pip installer * Revert "try cuda_pip installer" This reverts commit 6b3a167. * remove numpyro * revert to docker container to check nvidia driver versions * TST: fetch github actions hosted container * try install updated nvidia drivers (need reboot?) * update apt sources * use latest cuda=12.5 container * enable latex and download notebook builds * switch cache and publish to github actions
1 parent 743a37f commit c995915

File tree

5 files changed

+21
-83
lines changed

5 files changed

+21
-83
lines changed

.github/workflows/cache.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,10 @@ on:
44
branches:
55
- main
66
jobs:
7-
deploy-runner:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: iterative/setup-cml@v2
11-
- uses: actions/checkout@v4
12-
with:
13-
ref: ${{ github.event.pull_request.head.sha }}
14-
- name: Deploy runner on EC2
15-
env:
16-
REPO_TOKEN: ${{ secrets.QUANTECON_SERVICES_PAT }}
17-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
18-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
19-
run: |
20-
cml runner launch \
21-
--cloud=aws \
22-
--cloud-region=us-west-2 \
23-
--cloud-type=p3.2xlarge \
24-
--labels=cml-gpu \
25-
--cloud-hdd-size=40
267
cache:
27-
needs: deploy-runner
28-
runs-on: [self-hosted, cml-gpu]
8+
runs-on: ubuntu-latest-gpu
299
container:
30-
image: docker://mmcky/quantecon-lecture-python:cuda-12.3.1-anaconda-2024-02-py311
10+
image: ghcr.io/quantecon/lecture-python-container:cuda-12.5.0-anaconda-2024-02-py311
3111
options: --gpus all
3212
steps:
3313
- uses: actions/checkout@v4

.github/workflows/ci.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,10 @@
1-
name: Build Project [using jupyter-book]
1+
name: Build Preview [using jupyter-book]
22
on: [pull_request]
33
jobs:
4-
deploy-runner:
5-
runs-on: ubuntu-latest
6-
steps:
7-
- uses: iterative/setup-cml@v2
8-
- uses: actions/checkout@v4
9-
with:
10-
ref: ${{ github.event.pull_request.head.sha }}
11-
- name: Deploy runner on EC2
12-
env:
13-
REPO_TOKEN: ${{ secrets.QUANTECON_SERVICES_PAT }}
14-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
15-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
16-
run: |
17-
cml runner launch \
18-
--cloud=aws \
19-
--cloud-region=us-west-2 \
20-
--cloud-type=p3.2xlarge \
21-
--labels=cml-gpu \
22-
--cloud-hdd-size=40
234
preview:
24-
needs: deploy-runner
25-
runs-on: [self-hosted, cml-gpu]
5+
runs-on: ubuntu-latest-gpu
266
container:
27-
image: docker://mmcky/quantecon-lecture-python:cuda-12.3.1-anaconda-2024-02-py311
7+
image: ghcr.io/quantecon/lecture-python-container:cuda-12.5.0-anaconda-2024-02-py311
288
options: --gpus all
299
steps:
3010
- uses: actions/checkout@v4

.github/workflows/publish.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,11 @@ on:
44
tags:
55
- 'publish*'
66
jobs:
7-
deploy-runner:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: iterative/setup-cml@v2
11-
- uses: actions/checkout@v4
12-
with:
13-
ref: ${{ github.event.pull_request.head.sha }}
14-
- name: Deploy runner on EC2
15-
env:
16-
REPO_TOKEN: ${{ secrets.QUANTECON_SERVICES_PAT }}
17-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
18-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
19-
run: |
20-
cml runner launch \
21-
--cloud=aws \
22-
--cloud-region=us-west-2 \
23-
--cloud-type=p3.2xlarge \
24-
--labels=cml-gpu \
25-
--cloud-hdd-size=40
267
publish:
278
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
28-
needs: deploy-runner
29-
runs-on: [self-hosted, cml-gpu]
9+
runs-on: ubuntu-latest-gpu
3010
container:
31-
image: docker://mmcky/quantecon-lecture-python:cuda-12.3.1-anaconda-2024-02-py311
11+
image: ghcr.io/quantecon/lecture-python-container:cuda-12.5.0-anaconda-2024-02-py311
3212
options: --gpus all
3313
steps:
3414
- name: Checkout
@@ -46,7 +26,7 @@ jobs:
4626
run: pip list
4727
# Download Build Cache from cache.yml
4828
- name: Download "build" folder (cache)
49-
uses: dawidd6/action-download-artifact@v2
29+
uses: dawidd6/action-download-artifact@v3
5030
with:
5131
workflow: cache.yml
5232
branch: main

environment.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
name: lecture-jax
1+
name: quantecon
22
channels:
33
- default
44
dependencies:
55
- python=3.11
6-
- anaconda=2023.09
6+
- anaconda=2024.02
77
- pip
88
- pip:
99
- jupyter-book==0.15.1
10-
- docutils==0.17.1
1110
- quantecon-book-theme==0.7.1
1211
- sphinx-tojupyter==0.3.0
1312
- sphinxext-rediraffe==0.2.7
13+
- sphinx-reredirects==0.1.3
1414
- sphinx-exercise==0.4.1
1515
- ghp-import==1.1.0
1616
- sphinxcontrib-youtube==1.1.0
1717
- sphinx-togglebutton==0.3.1
18-
- arviz==0.13.0
18+
- array-to-latex
19+
- prettytable
1920
- kaleido
20-
# Sandpit Requirements
21-
# - quantecon
22-
# - array-to-latex
23-
# - PuLP
24-
# - cvxpy
25-
# - cvxopt
26-
# - cylp
27-
# - prettytable
21+
- arviz
22+
# Docker Requirements
23+
- pytz
24+
# Docutils Issue (https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/322)
25+
- docutils==0.17.1
26+

lectures/status.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ This table contains the latest execution statistics.
1818

1919
(status:machine-details)=
2020

21-
These lectures are built on `linux` instances through `github actions` and `amazon web services (aws)` to
22-
enable access to a `gpu`. These lectures are built on a [p3.2xlarge](https://aws.amazon.com/ec2/instance-types/p3/)
23-
that has access to `8 vcpu's`, a `V100 NVIDIA Tesla GPU`, and `61 Gb` of memory.
21+
These lectures are built on `linux` instances through `github actions` that has
22+
access to a `gpu`. These lectures make use of the nvidia `T4` card.
2423

2524
You can check the backend used by JAX using:
2625

0 commit comments

Comments
 (0)