forked from facebookresearch/habitat-sim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·44 lines (36 loc) · 879 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Propagate failures properly
set -e
builder_args=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
--run-tests)
shift
RUN_TESTS=true
builder_args+=("--build-tests")
;;
*) # Forward unknown args to builder
shift
builder_args+=("$key")
;;
esac
done
# devfair/learnfair custom stuff: EGL path, and module loads
my_hostname=`hostname`
if [[ $my_hostname =~ "fair" ]]; then
module purge
module load cuda/10.0
module load cudnn/v7.4-cuda.10.0
module load gcc/7.1.0
module load cmake/3.10.1/gcc.5.4.0
fi
python setup.py build_ext --inplace "${builder_args[@]}"
if [ "$RUN_TESTS" = true ] ; then
cd build
ctest -V
fi