GitHub

Original file line numberDiff line numberDiff line change

@@ -4,40 +4,19 @@ on:

44

branches:

55

- main

66

jobs:

7-

deploy-runner:

8-

runs-on: ubuntu-latest

9-

steps:

10-

- uses: iterative/setup-cml@v1

11-

- uses: actions/checkout@v3

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]

29-

container:

30-

image: docker://mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-03-py310

31-

options: --gpus all

8+

runs-on: ubuntu-latest

329

steps:

3310

- uses: actions/checkout@v3

11+

- name: Setup Anaconda

12+

uses: conda-incubator/setup-miniconda@v2

3413

with:

35-

ref: ${{ github.event.pull_request.head.sha }}

36-

# Install Hardware Dependant Libraries

37-

- name: Check nvidia drivers

38-

shell: bash -l {0}

39-

run: |

40-

nvidia-smi

14+

auto-update-conda: true

15+

auto-activate-base: true

16+

miniconda-version: 'latest'

17+

python-version: "3.10"

18+

environment-file: environment.yml

19+

activate-environment: quantecon

4120

- name: Build HTML

4221

shell: bash -l {0}

4322

run: |

Original file line numberDiff line numberDiff line change

@@ -1,40 +1,32 @@

11

name: Build Project [using jupyter-book]

22

on: [pull_request]

33

jobs:

4-

deploy-runner:

5-

runs-on: ubuntu-latest

6-

steps:

7-

- uses: iterative/setup-cml@v1

8-

- uses: actions/checkout@v3

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]

26-

container:

27-

image: docker://mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-03-py310

28-

options: --gpus all

5+

runs-on: ubuntu-latest

296

steps:

307

- uses: actions/checkout@v3

8+

- name: Setup Anaconda

9+

uses: conda-incubator/setup-miniconda@v2

3110

with:

32-

ref: ${{ github.event.pull_request.head.sha }}

33-

# Install Hardware Dependant Libraries

34-

- name: Check nvidia drivers

35-

shell: bash -l {0}

11+

auto-update-conda: true

12+

auto-activate-base: true

13+

miniconda-version: 'latest'

14+

python-version: "3.10"

15+

environment-file: environment.yml

16+

activate-environment: quantecon

17+

- name: Install latex dependencies

3618

run: |

37-

nvidia-smi

19+

sudo apt-get -qq update

20+

sudo apt-get install -y \

21+

texlive-latex-recommended \

22+

texlive-latex-extra \

23+

texlive-fonts-recommended \

24+

texlive-fonts-extra \

25+

texlive-xetex \

26+

latexmk \

27+

xindy \

28+

dvipng \

29+

cm-super

3830

- name: Display Conda Environment Versions

3931

shell: bash -l {0}

4032

run: conda list

Original file line numberDiff line numberDiff line change

@@ -13,10 +13,10 @@ jobs:

1313

fail-fast: false

1414

matrix:

1515

os: ["ubuntu-latest"]

16-

python-version: ["3.9"]

16+

python-version: ["3.10"]

1717

steps:

1818

- name: Checkout

19-

uses: actions/checkout@v2

19+

uses: actions/checkout@v3

2020

- name: Setup Anaconda

2121

uses: conda-incubator/setup-miniconda@v2

2222

with:

Original file line numberDiff line numberDiff line change

@@ -4,40 +4,34 @@ on:

44

tags:

55

- 'publish*'

66

jobs:

7-

deploy-runner:

8-

runs-on: ubuntu-latest

9-

steps:

10-

- uses: iterative/setup-cml@v1

11-

- uses: actions/checkout@v3

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]

30-

container:

31-

image: docker://mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-03-py310

32-

options: --gpus all

9+

runs-on: ubuntu-latest

3310

steps:

3411

- name: Checkout

3512

uses: actions/checkout@v3

36-

# Install Hardware Dependant Libraries

37-

- name: Check nvidia drivers

38-

shell: bash -l {0}

13+

- name: Setup Anaconda

14+

uses: conda-incubator/setup-miniconda@v2

15+

with:

16+

auto-update-conda: true

17+

auto-activate-base: true

18+

miniconda-version: 'latest'

19+

python-version: "3.10"

20+

environment-file: environment.yml

21+

activate-environment: quantecon

22+

- name: Install latex dependencies

3923

run: |

40-

nvidia-smi

24+

sudo apt-get -qq update

25+

sudo apt-get install -y \

26+

texlive-latex-recommended \

27+

texlive-latex-extra \

28+

texlive-fonts-recommended \

29+

texlive-fonts-extra \

30+

texlive-xetex \

31+

latexmk \

32+

xindy \

33+

dvipng \

34+

cm-super

4135

- name: Display Conda Environment Versions

4236

shell: bash -l {0}

4337

run: conda list

Original file line numberDiff line numberDiff line change

@@ -18,6 +18,4 @@ 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`.

Read the original on github.com ↗