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

[WIP] - CI Migration Test #2500

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cf054bf
add github actions and workflows test for basic setup, linting, and i…
aclegg3 Jul 2, 2024
67bd02e
add cmake install
aclegg3 Jul 3, 2024
b6454aa
add shell for cmake build
aclegg3 Jul 3, 2024
1b5256f
add ssh debug
aclegg3 Jul 3, 2024
ed1cd52
try sudo
aclegg3 Jul 3, 2024
40c75d9
add dependency installs and adjust python bin path
aclegg3 Jul 3, 2024
29c94e3
try activating conda env correctly
aclegg3 Jul 3, 2024
8716b0c
try changing the permissions and not building with sudo
aclegg3 Jul 3, 2024
248a130
refresh PATH to find cmake?
aclegg3 Jul 3, 2024
84bc959
more details
aclegg3 Jul 3, 2024
afc7303
try again
aclegg3 Jul 3, 2024
01480e3
try opening permissions to /usr/local/bin
aclegg3 Jul 3, 2024
ccb2d50
open ssh again
aclegg3 Jul 10, 2024
852db96
remove failing cmake call
aclegg3 Jul 10, 2024
e3357e2
changing permissions broke sudo
aclegg3 Jul 10, 2024
e74725e
fix build process and download test data before ssh
aclegg3 Jul 10, 2024
d423c0f
move ssh back up
aclegg3 Jul 10, 2024
d4361ff
reset owner recursively for cmake dir
aclegg3 Jul 10, 2024
5b45670
setup conda env activation uniformly
aclegg3 Jul 10, 2024
3a510cc
Only set CUDA device when CUDA is active.
0mdc Nov 13, 2024
5ecd02d
Revert "Only set CUDA device when CUDA is active."
0mdc Nov 13, 2024
76d79dd
Move tmate up.
0mdc Nov 14, 2024
b92f71c
Headless test.
0mdc Nov 15, 2024
03ef073
Bugfix + update tmate.
0mdc Nov 15, 2024
5df7258
Use CUDA device API.
0mdc Nov 18, 2024
59bd75c
Install Ubuntu GPU dependencies.
0mdc Nov 18, 2024
de81c6d
Fix typo
0mdc Nov 18, 2024
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
72 changes: 72 additions & 0 deletions .github/actions/install_ubuntu_deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: install_ubuntu_deps
runs:
using: composite
steps:
- name: install cmake
# OpenEXR requires CMake 3.12. We also download CMake 3.20, which
# we'll use later for the JS build only.
run: |
echo $(date +%F) > ./date
echo $(git ls-remote https://github.com/facebookresearch/habitat-lab.git HEAD | awk '{ print $1}') > ./hablab_sha
cat ./hablab_sha
wget https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh
wget https://cmake.org/files/v3.20/cmake-3.20.1-linux-x86_64.sh
sudo mkdir /opt/cmake312
sudo mkdir /opt/cmake320
sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license
sudo sh ./cmake-3.20.1-linux-x86_64.sh --prefix=/opt/cmake320 --skip-license
sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake
shell: bash
- name: Install dependencies
run: |-
echo "Install dependencies"
sudo apt-get update || true
sudo apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
vim \
ca-certificates \
libjpeg-dev \
libglm-dev \
libegl1-mesa-dev \
ninja-build \
xorg-dev \
freeglut3-dev \
pkg-config \
wget \
zip \
lcov\
libhdf5-dev \
libomp-dev \
unzip || true
shell: bash
- name: Install cuda
run: |-
echo "Install cuda"
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-3
touch ~/cuda_installed
if command -v nvidia-smi; then nvidia-smi; fi
shell: bash
- name: Setup miniconda
uses: conda-incubator/[email protected]
with:
miniconda-version: "latest"
python-version: "3.9"
activate-environment: "habitat"
- name: Install conda and dependencies
run: |-
echo "Install conda and dependencies"
conda install -y pytorch==1.12.1 torchvision==0.13.1 -c pytorch -c nvidia
conda install -y -c conda-forge ninja numpy pytest pytest-cov ccache hypothesis pytest-mock
0mdc marked this conversation as resolved.
Show resolved Hide resolved
pip install pytest-sugar pytest-xdist pytest-benchmark opencv-python cython mock
shell: bash -el {0}
- name: Validate Pytorch Installation
run: |-
echo "Validate Pytorch Installation"
# Check that pytorch is installed with CUDA.
python -c 'import torch; torch.cuda.set_device(0)'
shell: bash -el {0}
99 changes: 99 additions & 0 deletions .github/workflows/install_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Install and test
on:
pull_request: {}
push:
branches:
- main

jobs:
python_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup python
uses: actions/[email protected]
with:
python-version: '3.9.16'
- name: setup
run: |-
pip install -U pip
pip install -U --prefer-binary \
black==23.1.0 \
flake8 \
flake8-bugbear==22.6.22 \
flake8-builtins \
flake8-comprehensions \
flake8-return \
flake8-simplify \
hypothesis==6.29.3 \
isort==5.12.0 \
mypy \
numpy \
0mdc marked this conversation as resolved.
Show resolved Hide resolved
pytest \
sphinx \
tqdm
pip install --prefer-binary -r requirements.txt torch --progress-bar off
- name: run black
run: |-
black --version
black --exclude '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist)|examples/tutorials/(notebooks|nb_python)' src_python/habitat_sim/. examples/. tests/. setup.py --diff
black --exclude '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist)|examples/tutorials/(notebooks|nb_python)' src_python/habitat_sim/. examples/. tests/. setup.py --check
- name: run isort
run: |-
isort --version
isort src_python/habitat_sim/. examples/. tests/. setup.py --diff
isort src_python/habitat_sim/. examples/. tests/. setup.py --check-only
- name: run flake8
run: |-
flake8 --version
flake8 src_python/habitat_sim/. examples/. tests/. setup.py
- name: run mypy
run: mypy

install_and_test_ubuntu:
runs-on: 4-core-ubuntu-gpu-t4
env:
FPS_THRESHOLD: 900
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/[email protected]
with:
path: "./habitat-sim"
- name: CPU info
run: cat /proc/cpuinfo
- name: Debugging with tmate
uses: mxschmitt/[email protected]
- uses: "./habitat-sim/.github/actions/install_ubuntu_deps"
- name: Build, install habitat-sim
run: |-
#give cmake ownership to the runner for installation
sudo chown runner -R /opt/cmake312/
#activate conda env
export PATH=$HOME/miniconda/bin:$PATH
conda init
source ~/.bashrc
conda activate habitat
#install habitat-sim
cd habitat-sim
pip install -r requirements.txt --progress-bar off
git submodule update --init --recursive --jobs 8
python -u setup.py install --build-type "Release" --lto --headless --bullet
- name: Download test data
run: |-
# Disable clone protection for git lfs
export GIT_CLONE_PROTECTION_ACTIVE=false

sudo apt install git-lfs
git --version
git-lfs --version
export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH
. activate habitat
conda install -y gitpython git-lfs
cd habitat-sim
git lfs install
python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets ycb rearrange_dataset_v2 --replace --data-path data/ --no-prune
ls -la data/scene_datasets/habitat-test-scenes/
- name: Debugging with tmate
uses: mxschmitt/[email protected]
Loading