Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekmig committed Oct 12, 2023
1 parent de84894 commit 345c71e
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 201 deletions.
151 changes: 0 additions & 151 deletions .circleci/config.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/deploy.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/test-pip-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
gpu-arch-version: ${{ matrix.cuda_arch_version }}
script: |
# Create Conda Env
python3 -m pip install --upgrade pip
python3 -m pip install -e .[dev]
python3 -m pip install --upgrade pip --progress-bar off
python3 -m pip install -e .[dev] --progress-bar off
# Build package
python3 -m pip install build
python3 -m pip install build --progress-bar off
python3 -m build
# Run Tests
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/test-website-depoy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test deployment

on:
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Setup / build docs
run: |
sudo chmod -R 777 .
./scripts/install_via_pip.sh -n -d
./scripts/build_docs.sh -b
cd website
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test build website
run: yarn build
53 changes: 53 additions & 0 deletions .github/workflows/website-depoy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

permissions:
contents: write

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: Setup
run: mkdir -p website/static/.circleci && cp -a .circleci/. website/static/.circleci/.
./scripts/build_docs.sh -b

- name: Setup / build docs
run: |
sudo chmod -R 777 .
./scripts/install_via_pip.sh -n -d
./scripts/build_docs.sh -b
cd website
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
14 changes: 7 additions & 7 deletions scripts/install_via_pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,30 @@ sudo apt install yarn
export TERM=xterm

# upgrade pip
pip install --upgrade pip
pip install --upgrade pip --progress-bar off

# install captum with dev deps
pip install -e .[dev]
pip install -e .[dev] --progress-bar off
BUILD_INSIGHTS=1 python setup.py develop

# install other frameworks if asked for and make sure this is before pytorch
if [[ $FRAMEWORKS == true ]]; then
pip install pytext-nlp
pip install pytext-nlp --progress-bar off
fi

# install pytorch nightly if asked for
if [[ $PYTORCH_NIGHTLY == true ]]; then
pip install --upgrade --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
pip install --upgrade --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html --progress-bar off
else
# If no version is specified, upgrade to the latest release.
if [[ $CHOSEN_TORCH_VERSION == -1 ]]; then
pip install --upgrade torch
pip install --upgrade torch --progress-bar off
else
pip install torch==$CHOSEN_TORCH_VERSION
pip install torch==$CHOSEN_TORCH_VERSION --progress-bar off
fi
fi

# install deployment bits if asked for
if [[ $DEPLOY == true ]]; then
pip install beautifulsoup4 ipython nbconvert==5.6.1
pip install beautifulsoup4 ipython nbconvert==5.6.1 --progress-bar off
fi

0 comments on commit 345c71e

Please sign in to comment.