-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some workflow, CI and release improvements (#107)
* Start preparing CI for release * Change docker omnigibson dirname to avoid path conflict during import * Create protect-main.yml * Bolder comment. * Fix branch name * Split dockerfile into dev/prod use cases * Build docker-based test and docs workflow * Try with source instead of bash * Force docs rm
- Loading branch information
Showing
11 changed files
with
147 additions
and
164 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,62 @@ | ||
name: Build & deploy docs | ||
|
||
on: [push] | ||
on: [pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-docs: | ||
name: Build and deploy documentation | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'StanfordVL/OmniGibson' && github.ref == 'refs/heads/master' | ||
docs: | ||
runs-on: [linux] | ||
container: | ||
image: stanfordvl/omnigibson-dev:latest | ||
options: --gpus=all --privileged --user=root | ||
env: | ||
DISPLAY: "" | ||
OMNIGIBSON_HEADLESS: 1 | ||
volumes: | ||
- /scr/omni-data/datasets:/data | ||
- /usr/share/vulkan/icd.d/nvidia_icd.json:/etc/vulkan/icd.d/nvidia_icd.json | ||
- /usr/share/vulkan/icd.d/nvidia_layers.json:/etc/vulkan/implicit_layer.d/nvidia_layers.json | ||
- /usr/share/glvnd/egl_vendor.d/10_nvidia.json:/usr/share/glvnd/egl_vendor.d/10_nvidia.json | ||
- /scr/omni-data/isaac-sim/cache/ov:/root/.cache/ov:rw | ||
- /scr/omni-data/isaac-sim/cache/pip:/root/.cache/pip:rw | ||
- /scr/omni-data/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw | ||
- /scr/omni-data/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw | ||
- /scr/omni-data/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw | ||
- /scr/omni-data/isaac-sim/config:/root/.nvidia-omniverse/config:rw | ||
- /scr/omni-data/isaac-sim/data:/root/.local/share/ov/data:rw | ||
- /scr/omni-data/isaac-sim/documents:/root/Documents:rw | ||
|
||
defaults: | ||
run: | ||
shell: micromamba run -n omnigibson /bin/bash -leo pipefail {0} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
architecture: x64 | ||
|
||
- name: Install dev requirements | ||
run: pip install -r requirements-dev.txt | ||
|
||
- name: Generate docs | ||
working-directory: ./docs | ||
run: make html | ||
|
||
- name: Deploy to gh-pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/_build/html | ||
- name: Fix home | ||
run: echo "HOME=/root" >> $GITHUB_ENV | ||
|
||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
path: omnigibson-src | ||
|
||
- name: Install dev requirements | ||
working-directory: omnigibson-src | ||
run: pip install -r requirements-dev.txt | ||
|
||
- name: Install | ||
working-directory: omnigibson-src | ||
run: pip install -e . | ||
|
||
- name: Build docs | ||
working-directory: omnigibson-src | ||
run: source /isaac-sim/setup_conda_env.sh && source build_docs.sh | ||
|
||
- name: Deploy to gh-pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./omnigibson-src/site |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Disallow PRs to main branch | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
protect-main: | ||
name: Disallow PRs to main branch | ||
runs-on: ubuntu-latest | ||
if: ${{ github.base_ref == 'main' }} | ||
|
||
steps: | ||
- name: Comment on PR | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
message: | | ||
Hi, research friend! :wave: | ||
It looks like you are trying to merge a PR to the `main` branch. | ||
This branch is for released code only. **Please PR your code onto `og-develop` instead.** | ||
Thank you! | ||
- name: Fail | ||
run: exit 1 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,81 +9,53 @@ concurrency: | |
jobs: | ||
test: | ||
runs-on: [self-hosted, linux, gpu] | ||
if: github.repository == 'StanfordVL/OmniGibson-dev' | ||
container: | ||
image: stanfordvl/omnigibson-dev:latest | ||
options: --gpus=all --privileged --user=root | ||
env: | ||
DISPLAY: "" | ||
OMNIGIBSON_HEADLESS: 1 | ||
volumes: | ||
- /scr/omni-data/datasets:/data | ||
- /usr/share/vulkan/icd.d/nvidia_icd.json:/etc/vulkan/icd.d/nvidia_icd.json | ||
- /usr/share/vulkan/icd.d/nvidia_layers.json:/etc/vulkan/implicit_layer.d/nvidia_layers.json | ||
- /usr/share/glvnd/egl_vendor.d/10_nvidia.json:/usr/share/glvnd/egl_vendor.d/10_nvidia.json | ||
- /scr/omni-data/isaac-sim/cache/ov:/root/.cache/ov:rw | ||
- /scr/omni-data/isaac-sim/cache/pip:/root/.cache/pip:rw | ||
- /scr/omni-data/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw | ||
- /scr/omni-data/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw | ||
- /scr/omni-data/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw | ||
- /scr/omni-data/isaac-sim/config:/root/.nvidia-omniverse/config:rw | ||
- /scr/omni-data/isaac-sim/data:/root/.local/share/ov/data:rw | ||
- /scr/omni-data/isaac-sim/documents:/root/Documents:rw | ||
|
||
defaults: | ||
run: | ||
shell: micromamba run -n omnigibson /bin/bash -leo pipefail {0} | ||
|
||
steps: | ||
- name: Fix home | ||
run: echo "HOME=/root" >> $GITHUB_ENV | ||
|
||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
path: omnigibson | ||
|
||
- name: Add CUDA to env | ||
run: echo "/usr/local/cuda/bin" >> $GITHUB_PATH | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
architecture: x64 | ||
path: omnigibson-src | ||
|
||
- name: Install dev requirements | ||
working-directory: omnigibson | ||
working-directory: omnigibson-src | ||
run: pip install -r requirements-dev.txt | ||
|
||
- name: Install | ||
working-directory: omnigibson | ||
run: pip install -e . | ||
|
||
- name: Uninstall pip bddl | ||
working-directory: omnigibson | ||
run: pip uninstall -y bddl | ||
|
||
- name: Checkout BDDL | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: StanfordVL/bddl-dev | ||
ref: 581be50e7cfd2b3a1447aaa1b4fc2424b673339c | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # PAT is required since this is a different repo | ||
path: bddl | ||
submodules: recursive | ||
lfs: true | ||
|
||
- name: Install BDDL | ||
working-directory: bddl | ||
working-directory: omnigibson-src | ||
run: pip install -e . | ||
|
||
- name: Link Dataset | ||
working-directory: omnigibson | ||
run: ln -s /scr/ig-data omnigibson/data | ||
|
||
# The below method of checking out ig-dataset is currently unused due to poor speed. | ||
# - name: Create data directory | ||
# run: mkdir -p omnigibson/omnigibson/data | ||
# | ||
# - name: Checkout og_dataset | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# repository: StanfordVL/og_dataset | ||
# token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # PAT is required since this is a different repo | ||
# path: omnigibson/omnigibson/data/og_dataset | ||
# submodules: recursive | ||
# lfs: true | ||
# | ||
# - name: Checkout og_assets | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# repository: StanfordVL/og_assets | ||
# token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # PAT is required since this is a different repo | ||
# path: omnigibson/omnigibson/data/assets | ||
# submodules: recursive | ||
# lfs: true | ||
|
||
- name: Run tests | ||
working-directory: omnigibson | ||
run: pytest | ||
working-directory: omnigibson-src | ||
run: source /isaac-sim/setup_conda_env.sh && pytest | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
# - name: Upload coverage to Codecov | ||
# uses: codecov/[email protected] | ||
# with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
docker build \ | ||
-t stanfordvl/omnigibson-dev:latest \ | ||
-f docker/dev.Dockerfile \ | ||
. | ||
|
||
docker build \ | ||
-t stanfordvl/omnigibson:latest \ | ||
-t stanfordvl/omnigibson:$(sed -ne "s/.*version= *['\"]\([^'\"]*\)['\"] *.*/\1/p" setup.py) \ | ||
-f docker/Dockerfile \ | ||
-f docker/prod.Dockerfile \ | ||
. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM stanfordvl/omnigibson-dev | ||
|
||
# Copy over omnigibson source | ||
ADD . /omnigibson-src | ||
WORKDIR /omnigibson-src | ||
|
||
# Install OmniGibson | ||
RUN pip install -e . | ||
|
||
# Add setup to be executed on bash launch | ||
RUN echo "OMNIGIBSON_NO_OMNIVERSE=1 python -m omnigibson.scripts.setup" >> /root/.bashrc | ||
ENTRYPOINT [] | ||
|
||
CMD ["/bin/bash"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
docker push stanfordvl/omnigibson:latest | ||
docker push stanfordvl/omnigibson:$(sed -ne "s/.*version= *['\"]\([^'\"]*\)['\"] *.*/\1/p" setup.py) | ||
docker push stanfordvl/omnigibson:$(sed -ne "s/.*version= *['\"]\([^'\"]*\)['\"] *.*/\1/p" setup.py) | ||
docker push stanfordvl/omnigibson-dev:latest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
pytest>=6.2.3 | ||
pytest-cov>=3.0.0 | ||
mkdocs | ||
mkdocs-autorefs | ||
mkdocs-gen-files | ||
mkdocs-material | ||
mkdocs-material-extensions | ||
mkdocstrings[python] | ||
mkdocs-section-index | ||
mkdocs-literate-nav |