Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: remove ec2 and run on GitHub Actions quantecon-gpu #27

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: github-actions
directory: /
commit-message:
prefix: ⬆️
schedule:
interval: weekly
24 changes: 2 additions & 22 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,10 @@ on:
branches:
- main
jobs:
deploy-runner:
runs-on: ubuntu-latest
steps:
- uses: iterative/setup-cml@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Deploy runner on EC2
env:
REPO_TOKEN: ${{ secrets.QUANTECON_SERVICES_PAT }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
cml runner launch \
--cloud=aws \
--cloud-region=us-west-2 \
--cloud-type=p3.2xlarge \
--labels=cml-gpu \
--cloud-hdd-size=50
cache:
needs: deploy-runner
runs-on: [self-hosted, cml-gpu]
runs-on: quantecon-gpu
container:
image: docker://mmcky/quantecon-lecture-python:cuda-12.3.1-anaconda-2024-02-py311
image: ghcr.io/quantecon/lecture-python-container:cuda-12.6.0-anaconda-2024-10-py312
options: --gpus all
steps:
- uses: actions/checkout@v4
Expand Down
38 changes: 9 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
name: Build Project [using jupyter-book]
on: [pull_request]
jobs:
deploy-runner:
runs-on: ubuntu-latest
steps:
- uses: iterative/setup-cml@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Deploy runner on EC2
env:
REPO_TOKEN: ${{ secrets.QUANTECON_SERVICES_PAT }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
cml runner launch \
--cloud=aws \
--cloud-region=us-west-2 \
--cloud-type=p3.2xlarge \
--labels=cml-gpu \
--cloud-hdd-size=50
preview:
needs: deploy-runner
runs-on: [self-hosted, cml-gpu]
runs-on: quantecon-gpu
container:
image: docker://mmcky/quantecon-lecture-python:cuda-12.3.1-anaconda-2024-02-py311
image: ghcr.io/quantecon/lecture-python-container:cuda-12.6.0-anaconda-2024-10-py312
options: --gpus all
steps:
- uses: actions/checkout@v4
Expand All @@ -40,13 +20,13 @@ jobs:
- name: Display Pip Versions
shell: bash -l {0}
run: pip list
- name: Download "build" folder (cache)
uses: dawidd6/action-download-artifact@v2
with:
workflow: cache.yml
branch: main
name: build-cache
path: _build
# - name: Download "build" folder (cache)
# uses: dawidd6/action-download-artifact@v2
# with:
# workflow: cache.yml
# branch: main
# name: build-cache
# path: _build
# Build Assets (Download Notebooks and PDF via LaTeX)
- name: Build Download Notebooks (sphinx-tojupyter)
shell: bash -l {0}
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/collab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build Project on Google Collab (Execution)
on: [pull_request]
jobs:
execution-checks:
runs-on: quantecon-gpu
container:
image: docker://us-docker.pkg.dev/colab-images/public/runtime
options: --gpus all
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check nvidia drivers
shell: bash -l {0}
run: |
nvidia-smi
- name: Check python version
shell: bash -l {0}
run: |
python --version
- name: Display Pip Versions
shell: bash -l {0}
run: pip list
- name: Download "build" folder (cache)
uses: dawidd6/action-download-artifact@v3
with:
workflow: cache.yml
branch: main
name: build-cache
path: _build
# Install build software
- name: Install Build Software
shell: bash -l {0}
run: |
pip install jupyter-book==0.15.1 docutils==0.17.1 quantecon-book-theme==0.7.2 sphinx-tojupyter==0.3.0 sphinxext-rediraffe==0.2.7 sphinx-reredirects sphinx-exercise==0.4.1 sphinxcontrib-youtube==1.1.0 sphinx-togglebutton==0.3.1 arviz==0.13.0
# Build of HTML (Execution Testing)
- name: Build HTML
shell: bash -l {0}
run: |
jb build lectures --path-output ./ -n -W --keep-going
- name: Upload Execution Reports
uses: actions/upload-artifact@v4
if: failure()
with:
name: execution-reports
path: _build/html/reports
- name: Preview Deploy to Netlify
uses: nwtgck/actions-netlify@v2
with:
publish-dir: '_build/html/'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Preview Deploy from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
24 changes: 2 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,11 @@ on:
tags:
- 'publish*'
jobs:
deploy-runner:
runs-on: ubuntu-latest
steps:
- uses: iterative/setup-cml@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Deploy runner on EC2
env:
REPO_TOKEN: ${{ secrets.QUANTECON_SERVICES_PAT }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
cml runner launch \
--cloud=aws \
--cloud-region=us-west-2 \
--cloud-type=p3.2xlarge \
--labels=cml-gpu \
--cloud-hdd-size=50
publish:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
needs: deploy-runner
runs-on: [self-hosted, cml-gpu]
runs-on: quantecon-gpu
container:
image: docker://mmcky/quantecon-lecture-python:cuda-12.3.1-anaconda-2024-02-py311
image: ghcr.io/quantecon/lecture-python-container:cuda-12.6.0-anaconda-2024-10-py312
options: --gpus all
steps:
- name: Checkout
Expand Down
Loading
Loading