-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BE] github actions migration (#2422)
* add github actions and workflows --------- Co-authored-by: Mikael Dallaire Cote <[email protected]>
- Loading branch information
Showing
5 changed files
with
541 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: download_test_data | ||
runs: | ||
using: composite | ||
steps: | ||
- name: download_test_data | ||
run: | | ||
# Disable clone protection for git lfs | ||
export GIT_CLONE_PROTECTION_ACTIVE=false | ||
git --version | ||
git-lfs --version | ||
export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH | ||
conda init | ||
source ~/.bashrc | ||
conda 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/ | ||
shell: bash -el {0} |
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,61 @@ | ||
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 | ||
sudo mkdir /opt/cmake312 | ||
sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license | ||
sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake | ||
sudo ln -s /opt/cmake312/bin/ctest /usr/local/bin/ctest | ||
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 \ | ||
git-lfs \ | ||
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: 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 | ||
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} |
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,24 @@ | ||
# This action installs required Ubuntu NVIDIA dependencies. | ||
# It assumes that `nvidia-smi` is available on the system. | ||
name: "Install GPU Dependencies" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install GPU Dependencies | ||
shell: bash | ||
run: | | ||
NVIDIA_SMI_OUTPUT=$(nvidia-smi) | ||
# Extract CUDA version (e.g., 11.7) | ||
CUDA_VERSION=$(echo "$NVIDIA_SMI_OUTPUT" | grep -oP 'CUDA Version:\s+\K[\d.]+') | ||
FULL_DRIVER_VERSION=$(echo "$NVIDIA_SMI_OUTPUT" | grep -oP 'Driver Version:\s+\K[\d.]+') | ||
MAJOR_DRIVER_VERSION=$(echo "$NVIDIA_SMI_OUTPUT" | grep -oP 'Driver Version:\s+\K\d+') | ||
UBUNTU_PACKAGE_SUFFIX="${MAJOR_DRIVER_VERSION}=${FULL_DRIVER_VERSION}-0ubuntu1" | ||
sudo apt-get update | ||
sudo apt-get install -y cuda-toolkit-${CUDA_VERSION} | ||
sudo apt-get install -y nvidia-gds-${CUDA_VERSION} | ||
sudo apt-get install -y libnvidia-common-${UBUNTU_PACKAGE_SUFFIX} | ||
sudo apt-get install -y libnvidia-gl-${UBUNTU_PACKAGE_SUFFIX} | ||
sudo apt-get install -y libnvidia-compute-${UBUNTU_PACKAGE_SUFFIX} --allow-downgrades | ||
sudo apt-get install -y libnvidia-decode-${UBUNTU_PACKAGE_SUFFIX} | ||
sudo apt-get install -y libnvidia-encode-${UBUNTU_PACKAGE_SUFFIX} |
Oops, something went wrong.