Update OCP-introduction.ipynb to use checkpoint_path parameter in OCP… #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
# Trigger the workflow on push to main branch | |
push: | |
branches: | |
- main | |
# This job installs dependencies, build the book, and pushes it to `gh-pages` | |
jobs: | |
build-and-deploy-book: | |
defaults: | |
run: | |
shell: bash -l {0} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
# Install dependencies | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_22.11.1-1-Linux-x86_64.sh -O miniconda.sh | |
bash miniconda.sh -b -p "$HOME"/miniconda | |
source "$HOME"/miniconda/etc/profile.d/conda.sh | |
conda activate base | |
# Conda configuration | |
conda config --set always_yes yes --set auto_update_conda false | |
# Update conda | |
conda update conda | |
conda install mamba -n base -c conda-forge | |
# Install ocp conda env | |
source "$HOME"/miniconda/etc/profile.d/conda.sh | |
conda install -c conda-forge conda-merge | |
git clone https://github.com/Open-Catalyst-Project/ocp.git | |
cd ocp && conda-merge env.common.yml env.cpu.yml > env.yml && mamba env update -n base --file env.yml | |
pip install -e . | |
python -c "import ocpmodels as om; print(om.__file__)" | |
python -c "import ocpmodels.common.relaxation.ase_utils as au; print(au.__file__)" | |
cd "$HOME" | |
# Build the book | |
- name: Build the book | |
run: | | |
jupyter-book build ocp-tutorial | |
# Deploy the book's HTML to gh-pages branch | |
- name: GitHub Pages action | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ocp-tutorial/_build/html |