|
| 1 | +name: install_ubuntu_deps |
| 2 | +runs: |
| 3 | + using: composite |
| 4 | + steps: |
| 5 | + - name: install cmake |
| 6 | + # OpenEXR requires CMake 3.12. We also download CMake 3.20, which |
| 7 | + # we'll use later for the JS build only. |
| 8 | + run: | |
| 9 | + echo $(date +%F) > ./date |
| 10 | + echo $(git ls-remote https://github.com/facebookresearch/habitat-lab.git HEAD | awk '{ print $1}') > ./hablab_sha |
| 11 | + cat ./hablab_sha |
| 12 | + wget https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh |
| 13 | + sudo mkdir /opt/cmake312 |
| 14 | + sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license |
| 15 | + sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake |
| 16 | + sudo ln -s /opt/cmake312/bin/ctest /usr/local/bin/ctest |
| 17 | + shell: bash |
| 18 | + - name: Install dependencies |
| 19 | + run: |- |
| 20 | + echo "Install dependencies" |
| 21 | + sudo apt-get update || true |
| 22 | + sudo apt-get install -y --no-install-recommends \ |
| 23 | + build-essential \ |
| 24 | + git \ |
| 25 | + git-lfs \ |
| 26 | + curl \ |
| 27 | + vim \ |
| 28 | + ca-certificates \ |
| 29 | + libjpeg-dev \ |
| 30 | + libglm-dev \ |
| 31 | + libegl1-mesa-dev \ |
| 32 | + ninja-build \ |
| 33 | + xorg-dev \ |
| 34 | + freeglut3-dev \ |
| 35 | + pkg-config \ |
| 36 | + wget \ |
| 37 | + zip \ |
| 38 | + lcov\ |
| 39 | + libhdf5-dev \ |
| 40 | + libomp-dev \ |
| 41 | + unzip || true |
| 42 | + shell: bash |
| 43 | + - name: Setup miniconda |
| 44 | + uses: conda-incubator/setup-miniconda@v3.0.1 |
| 45 | + with: |
| 46 | + miniconda-version: "latest" |
| 47 | + python-version: "3.9" |
| 48 | + activate-environment: "habitat" |
| 49 | + - name: Install conda and dependencies |
| 50 | + run: |- |
| 51 | + echo "Install conda and dependencies" |
| 52 | + conda install -y pytorch==1.12.1 torchvision==0.13.1 -c pytorch -c nvidia |
| 53 | + conda install -y -c conda-forge ninja numpy pytest pytest-cov ccache hypothesis pytest-mock |
| 54 | + pip install pytest-sugar pytest-xdist pytest-benchmark opencv-python cython mock |
| 55 | + shell: bash -el {0} |
| 56 | + - name: Validate Pytorch Installation |
| 57 | + run: |- |
| 58 | + echo "Validate Pytorch Installation" |
| 59 | + # Check that pytorch is installed with CUDA. |
| 60 | + python -c 'import torch; torch.cuda.set_device(0)' |
| 61 | + shell: bash -el {0} |
0 commit comments