|
1 | 1 | name: Build Project [using jupyter-book] |
2 | 2 | on: [pull_request] |
3 | 3 | 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 |
23 | 4 | 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 |
29 | 6 | steps: |
30 | 7 | - uses: actions/checkout@v3 |
| 8 | + - name: Setup Anaconda |
| 9 | + uses: conda-incubator/setup-miniconda@v2 |
31 | 10 | 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 |
36 | 18 | 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 |
38 | 30 | - name: Display Conda Environment Versions |
39 | 31 | shell: bash -l {0} |
40 | 32 | run: conda list |
|
0 commit comments