1
+ version : 2
2
+ gpu : &gpu
3
+ machine :
4
+ image : ubuntu-1604-cuda-10.1:201909-23
5
+ resource_class : gpu.small
6
+ environment :
7
+ FPS_THRESHOLD : 900
8
+
9
+ jobs :
10
+ python_lint :
11
+ docker :
12
+ - image : circleci/python:3.6
13
+ steps :
14
+ - checkout
15
+ - run :
16
+ name : setup
17
+ command : |
18
+ sudo pip install black flake8 flake8-builtins flake8-bugbear flake8-comprehensions flake8-return flake8-simplify "isort[pyproject]" numpy --progress-bar off
19
+ sudo pip install -e . --progress-bar off
20
+ - run :
21
+ name : run black
22
+ command : |
23
+ black --exclude '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist)|examples/tutorials/(colabs|nb_python)' soundspaces/. ss_baselines/. scripts/. setup.py --diff
24
+ black --exclude '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist)|examples/tutorials/(colabs|nb_python)' soundspaces/. ss_baselines/. scripts/. setup.py --check
25
+ - run :
26
+ name : run isort
27
+ command : |
28
+ isort --version
29
+ isort soundspaces/. ss_baselines/. scripts/. setup.py --diff
30
+ isort soundspaces/. ss_baselines/. scripts/. setup.py --check-only
31
+ - run :
32
+ name : run flake8
33
+ command : |
34
+ flake8 --version
35
+ flake8 soundspaces/. ss_baselines/. scripts/. setup.py
36
+ install_and_test_ubuntu :
37
+ << : *gpu
38
+ steps :
39
+ - checkout :
40
+ path : ./sound-spaces
41
+ - run :
42
+ name : Install cmake
43
+ no_output_timeout : 5m
44
+ command : |
45
+ echo $(git ls-remote https://github.com/facebookresearch/habitat-sim.git HEAD | awk '{ print $1}') > ./hsim_sha
46
+ wget https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-Linux-x86_64.sh
47
+ sudo mkdir /opt/cmake
48
+ sudo sh ./cmake-3.13.4-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
49
+ sudo ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
50
+ - run :
51
+ name : Install dependencies
52
+ no_output_timeout : 20m
53
+ command : |
54
+ sudo apt-get update || true
55
+ sudo apt-get install -y --no-install-recommends \
56
+ build-essential \
57
+ git \
58
+ curl \
59
+ vim \
60
+ ca-certificates \
61
+ libbullet-dev \
62
+ libjpeg-dev \
63
+ libglm-dev \
64
+ libegl1-mesa-dev \
65
+ xorg-dev \
66
+ freeglut3-dev \
67
+ pkg-config \
68
+ wget \
69
+ zip \
70
+ libhdf5-dev \
71
+ unzip || true
72
+ sudo apt install --allow-change-held-packages \
73
+ texlive-base \
74
+ texlive-latex-extra \
75
+ texlive-fonts-extra \
76
+ texlive-fonts-recommended
77
+ - run :
78
+ name : Check CUDA
79
+ no_output_timeout : 20m
80
+ background : true
81
+ command : |
82
+ # wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
83
+ # sudo dpkg -i cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
84
+ # sudo apt-get update || true
85
+ # sudo apt-get --yes --force-yes install cuda
86
+ # touch ./cuda_installed
87
+ nvidia-smi
88
+ # Restore Conda cache
89
+ - restore_cache :
90
+ keys :
91
+ - conda-{{ checksum "sound-spaces/.circleci/config.yml" }}
92
+ - run :
93
+ name : Install conda and dependencies
94
+ no_output_timeout : 20m
95
+ command : |
96
+ if [ ! -d ~/miniconda ]
97
+ then
98
+ curl -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
99
+ chmod +x ~/miniconda.sh
100
+ ~/miniconda.sh -b -p $HOME/miniconda
101
+ rm ~/miniconda.sh
102
+ export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH
103
+ conda create -y -n soundspaces python=3.6
104
+ . activate soundspaces
105
+ conda install -q -y -c conda-forge ninja ccache numpy pytest pytest-mock pytest-cov
106
+ pip install pytest-sugar
107
+ fi
108
+ - run :
109
+ name : Install pytorch
110
+ no_output_timeout : 20m
111
+ background : true
112
+ command : |
113
+ if [ ! -f ~/miniconda/pytorch_installed ]
114
+ then
115
+ export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH
116
+ . activate soundspaces;
117
+ conda install -c conda-forge opencv -y
118
+ conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorch
119
+ fi
120
+ touch ~/miniconda/pytorch_installed
121
+ - restore_cache :
122
+ keys :
123
+ - habitat-sim-{{ checksum "./hsim_sha" }}
124
+ - restore_cache :
125
+ keys :
126
+ - ccache-{{ arch }}-master
127
+ paths :
128
+ - /home/circleci/.ccache
129
+ - run :
130
+ name : CCache initialization
131
+ command : |
132
+ export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH
133
+ . activate soundspaces;
134
+ ccache --show-stats
135
+ ccache --zero-stats
136
+ ccache --max-size=10.0G
137
+ - run :
138
+ name : Build, install habitat-sim and run benchmark
139
+ no_output_timeout : 30m
140
+ command : |
141
+ if [ ! -d ./habitat-sim ]
142
+ then
143
+ git clone https://github.com/facebookresearch/habitat-sim.git --recursive
144
+ fi
145
+ # while [ ! -f ./cuda_installed ]; do sleep 2; done # wait for CUDA
146
+ export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH
147
+ . activate soundspaces;
148
+ cd habitat-sim
149
+ pip install -r requirements.txt --progress-bar off
150
+ pip install pillow
151
+ python -u setup.py install --headless --with-cuda --bullet
152
+ - run :
153
+ name : Ccache stats
154
+ when : always
155
+ command : |
156
+ export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH
157
+ . activate soundspaces;
158
+ ccache --show-stats
159
+ - run :
160
+ name : Download test data
161
+ command : |
162
+ cd sound-spaces
163
+ wget http://dl.fbaipublicfiles.com/SoundSpaces/challenge_21/minival.tar
164
+ tar -xvf minival.tar
165
+ rm minival.tar
166
+ wget http://dl.fbaipublicfiles.com/SoundSpaces/pretrained_weights.tar.xz
167
+ tar -xvf pretrained_weights.tar.xz
168
+ mv pretrained_weights data/
169
+ rm pretrained_weights.tar.xz
170
+ - save_cache :
171
+ key : habitat-sim-{{ checksum "./hsim_sha" }}
172
+ background : true
173
+ paths :
174
+ - ./habitat-sim
175
+ - save_cache :
176
+ key : ccache-{{ arch }}-master
177
+ background : true
178
+ paths :
179
+ - /home/circleci/.ccache
180
+ - run :
181
+ name : Install habitat-lab
182
+ no_output_timeout : 20m
183
+ command : |
184
+ export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH
185
+ . activate soundspaces;
186
+ git clone git@github.com:facebookresearch/habitat-lab.git && cd habitat-lab && git checkout v0.1.6
187
+ pip --version
188
+ pip install -e .
189
+ - run :
190
+ name : Install sound-spaces
191
+ no_output_timeout : 20m
192
+ command : |
193
+ export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH
194
+ . activate soundspaces; cd sound-spaces
195
+ while [ ! -f ~/miniconda/pytorch_installed ]; do sleep 2; done # wait for Pytorch
196
+ pip install -e .
197
+ - save_cache :
198
+ key : conda-{{ checksum "sound-spaces/.circleci/config.yml" }}
199
+ background : true
200
+ paths :
201
+ - ~/miniconda
202
+ - run :
203
+ name : Run api tests
204
+ no_output_timeout : 30m
205
+ command : |
206
+ export PATH=$HOME/miniconda/bin:/usr/local/cuda/bin:$PATH
207
+ . activate soundspaces; cd sound-spaces
208
+ pip show torch
209
+ python ss_baselines/av_nav/run.py --run-type eval --exp-config ss_baselines/av_nav/config/audionav/mp3d/test_telephone/audiogoal_depth.yaml EVAL_CKPT_PATH_DIR data/pretrained_weights/audionav/av_nav/mp3d/heard.pth EVAL.SPLIT val_mini
210
+ python ss_baselines/av_nav/run.py --run-type eval --exp-config ss_baselines/av_nav/config/audionav/mp3d/test_telephone/audiogoal_depth.yaml EVAL_CKPT_PATH_DIR data/pretrained_weights/audionav/av_nav/mp3d/heard.pth EVAL.SPLIT val_mini USE_SYNC_VECENV True
211
+ python ss_baselines/av_nav/run.py --run-type eval --exp-config ss_baselines/av_nav/config/audionav/mp3d/test_telephone/audiogoal_depth.yaml EVAL_CKPT_PATH_DIR data/pretrained_weights/audionav/av_nav/mp3d/heard.pth EVAL.SPLIT val_mini TASK_CONFIG.SIMULATOR.USE_RENDERED_OBSERVATIONS True
212
+
213
+ workflows :
214
+ version : 2
215
+ install_and_test :
216
+ jobs :
217
+ - python_lint
218
+ - install_and_test_ubuntu
0 commit comments