Skip to content

Commit 2723fca

Browse files
committed
Add BEVFusion setup from @LucasEby
1 parent ecfcc1a commit 2723fca

1 file changed

Lines changed: 146 additions & 0 deletions

File tree

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# BEVFusion Set Up Instructions
2+
These instructions were tested on T4 g4dn.xlarge AWS instances with Arara Ubuntu 20.04 DCV images.
3+
4+
## Set Up Instructions for Cuda 11.3
5+
### Set Up your Nvida Driver
6+
```
7+
sudo apt-get update
8+
sudo apt-get install -y ubuntu-drivers-common
9+
ubuntu-drivers devices
10+
sudo apt-get install -y nvidia-driver-565
11+
sudo reboot
12+
```
13+
14+
### Check to make sure that your nvidia driver was set up correctly:
15+
```
16+
nvidia-smi
17+
```
18+
19+
### Install Cuda 11.3
20+
```
21+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
22+
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
23+
wget https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda-repo-ubuntu2004-11-3-local_11.3.0-465.19.01-1_amd64.deb
24+
sudo dpkg -i cuda-repo-ubuntu2004-11-3-local_11.3.0-465.19.01-1_amd64.deb # This never copy pastes right. Just manually type
25+
sudo apt-key add /var/cuda-repo-ubuntu2004-11-3-local/7fa2af80.pub
26+
sudo apt-get update
27+
sudo apt-get -y install cuda-11-3
28+
```
29+
30+
### Manually modify your bashrc file to include Cuda 11.3
31+
```
32+
sudo nano ~/.bashrc
33+
```
34+
35+
Add the next 2 lines to the bottom of the file:
36+
```
37+
export PATH=/usr/local/cuda-11.3/bin:$PATH
38+
export LD_LIBRARY_PATH=/usr/local/cuda-11.3/lib64:$LD_LIBRARY_PATH
39+
```
40+
41+
Ensure you source your bashrc file:
42+
```
43+
source ~/.bashrc
44+
nvidia-smi
45+
```
46+
47+
### Set Up Miniconda
48+
```
49+
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
50+
bash ~/Miniconda3-latest-Linux-x86_64.sh
51+
source ~/.bashrc
52+
```
53+
54+
### Set Up mmdetection3d:
55+
```
56+
conda create --name openmmlab python=3.8 -y
57+
conda activate openmmlab
58+
conda install pytorch=1.10.2 torchvision=0.11.3 cudatoolkit=11.3 -c pytorch
59+
pip install -U openmim
60+
mim install mmengine
61+
mim install 'mmcv>=2.0.0rc4, <2.2.0'
62+
mim install 'mmdet>=3.0.0,<3.3.0'
63+
pip install cumm-cu113
64+
pip install spconv-cu113
65+
git clone https://github.com/open-mmlab/mmdetection3d.git -b dev-1.x
66+
cd mmdetection3d
67+
pip install -v -e .
68+
python projects/BEVFusion/setup.py develop
69+
```
70+
71+
### Run this afterwards to verify BEVFusion has been set up correctly:
72+
```
73+
python projects/BEVFusion/demo/multi_modality_demo.py demo/data/nuscenes/n015-2018-07-24-11-22-45+0800__LIDAR_TOP__1532402927647951.pcd.bin demo/data/nuscenes/ demo/data/nuscenes/n015-2018-07-24-11-22-45+0800.pkl projects/BEVFusion/configs/bevfusion_lidar-cam_voxel0075_second_secfpn_8xb4-cyclic-20e_nus-3d.py ~/Downloads/bevfusion_lidar-cam_voxel0075_second_secfpn_8xb4-cyclic-20e_nus-3d-5239b1af.pth --cam-type all --score-thr 0.2 --show
74+
```
75+
76+
## Set Up Instructions for Cuda 11.1
77+
### Set Up your Nvida Driver
78+
```
79+
sudo apt-get update
80+
sudo apt-get install -y ubuntu-drivers-common
81+
ubuntu-drivers devices
82+
sudo apt-get install -y nvidia-driver-565
83+
sudo reboot
84+
```
85+
86+
### Check to make sure that your nvidia driver was set up correctly:
87+
```
88+
nvidia-smi
89+
```
90+
91+
### Install Cuda 11.3
92+
```
93+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
94+
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
95+
wget https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda-repo-ubuntu2004-11-1-local_11.1.0-455.23.05-1_amd64.deb
96+
sudo dpkg -i cuda-repo-ubuntu2004-11-1-local_11.1.0-455.23.05-1_amd64.deb
97+
sudo apt-key add /var/cuda-repo-ubuntu2004-11-1-local/7fa2af80.pub
98+
sudo apt-get update
99+
sudo apt-get -y install cuda-11-1
100+
```
101+
102+
### Manually modify your bashrc file to include Cuda 11.3
103+
```
104+
sudo nano ~/.bashrc
105+
```
106+
107+
Add the next 2 lines to the bottom of the file:
108+
```
109+
export PATH=/usr/local/cuda-11.1/bin:$PATH
110+
export LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64:$LD_LIBRARY_PATH
111+
```
112+
113+
Ensure you source your bashrc file:
114+
```
115+
source ~/.bashrc
116+
nvidia-smi
117+
```
118+
119+
### Set Up Miniconda
120+
```
121+
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
122+
bash ~/Miniconda3-latest-Linux-x86_64.sh
123+
source ~/.bashrc
124+
```
125+
126+
### Set Up mmdetection3d:
127+
```
128+
conda create --name openmmlab python=3.8 -y
129+
conda activate openmmlab
130+
pip install torch==1.10.0+cu111 torchvision==0.11.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html
131+
pip install -U openmim
132+
mim install mmengine
133+
mim install 'mmcv>=2.0.0rc4, <2.2.0'
134+
mim install 'mmdet>=3.0.0,<3.3.0'
135+
pip install cumm-cu111
136+
pip install spconv-cu111
137+
git clone https://github.com/open-mmlab/mmdetection3d.git -b dev-1.x
138+
cd mmdetection3d
139+
pip install -v -e .
140+
python projects/BEVFusion/setup.py develop
141+
```
142+
143+
### Run this afterwards to verify BEVFusion has been set up correctly:
144+
```
145+
python projects/BEVFusion/demo/multi_modality_demo.py demo/data/nuscenes/n015-2018-07-24-11-22-45+0800__LIDAR_TOP__1532402927647951.pcd.bin demo/data/nuscenes/ demo/data/nuscenes/n015-2018-07-24-11-22-45+0800.pkl projects/BEVFusion/configs/bevfusion_lidar-cam_voxel0075_second_secfpn_8xb4-cyclic-20e_nus-3d.py ~/Downloads/bevfusion_lidar-cam_voxel0075_second_secfpn_8xb4-cyclic-20e_nus-3d-5239b1af.pth --cam-type all --score-thr 0.2 --show
146+
```

0 commit comments

Comments
 (0)