Skip to content

Commit

Permalink
removes NCCL depencency
Browse files Browse the repository at this point in the history
  • Loading branch information
suhangpro committed Oct 15, 2018
1 parent 7153cec commit f821913
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Expand Up @@ -27,8 +27,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && rm ~/miniconda.sh

RUN git clone https://github.com/NVIDIA/nccl.git && cd nccl && make -j install && cd .. && rm -rf nccl

ENV CAFFE_ROOT=/opt/caffe
WORKDIR $CAFFE_ROOT

Expand All @@ -48,7 +46,7 @@ RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/BVLC/caffe.git . && \
rm -rf caffe-patch

RUN /bin/bash -c "source /opt/conda/bin/activate caffe && mkdir build && cd build && \
cmake -DUSE_CUDNN=1 -DUSE_NCCL=1 -Dpython_version=3 .. && \
cmake -DUSE_CUDNN=1 -Dpython_version=3 .. && \
make -j$(nproc)"

WORKDIR $CAFFE_ROOT/python
Expand Down
23 changes: 9 additions & 14 deletions INSTALL.md
Expand Up @@ -3,7 +3,7 @@ Step-by-step installation instructions for Ubuntu 16.04.

* Make sure CUDA and cuDNN are installed

We use CUDA 8 and cuDNN 6. But Caffe typically supports a wide range of CUDA/cuDNN versions.
We tested on CUDA8/cuDNN6 and CUDA9/cuDNN7. But Caffe typically supports a wide range of CUDA/cuDNN versions.

* Install system-wide dependencies
```bash
Expand All @@ -30,15 +30,6 @@ Step-by-step installation instructions for Ubuntu 16.04.
protobuf-compiler
```

* Install NCCL
```bash
git clone https://github.com/NVIDIA/nccl.git
cd nccl
sudo make -j install
cd ..
sudo rm -rf nccl
```

* Install conda and additional packages
```bash
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
Expand All @@ -62,7 +53,7 @@ Step-by-step installation instructions for Ubuntu 16.04.
rm -rf caffe-patch
source activate caffe
mkdir build && cd build
cmake -DUSE_CUDNN=1 -DUSE_NCCL=1 -Dpython_version=3 ..
cmake -DUSE_CUDNN=1 -Dpython_version=3 ..
make -j$(nproc)
cd $CAFFE_ROOT/python
sed -i -e "s/python-dateutil>=1.4,<2/python-dateutil>=2.0/g" requirements.txt
Expand All @@ -73,14 +64,18 @@ Step-by-step installation instructions for Ubuntu 16.04.
export PYCAFFE_ROOT=$(pwd)/python
export PYTHONPATH=\$PYCAFFE_ROOT:\$PYTHONPATH
export PATH=\$CAFFE_ROOT/build/tools:\$PYCAFFE_ROOT:\$PATH
" >> ~/.bashrc // this puts path in your .bashrc file -- it will take effect at next login
" >> ~/.bashrc # this puts path in your .bashrc file
source ~/.bashrc
sudo /bin/bash -c 'echo "$(pwd)/build/lib" >> /etc/ld.so.conf.d/caffe.conf'
sudo ldconfig
```

* Ready to use!
```bash
# enter conda environment
# you will need to use a new terminal for the first time
# enter conda environment if you are not already in one
source activate caffe
```

Note that for multi-GPU usage (not used or tested in our experiments and demos) you will also need NCCL:
* Before installing Caffe, install NCCL following [official instructions](https://github.com/NVIDIA/nccl).
* Add `-DUSE_NCCL=1` flag for cmake.
3 changes: 2 additions & 1 deletion data/README.md
Expand Up @@ -2,7 +2,8 @@

### Ruemonge428
1. Request data access from the [VarCity 3D Semantic Segmentation Challenge](https://varcity.ethz.ch/3dchallenge/) website.
2. Download and place the folder `ruemonge428` under `data/`. For the 3D segmentation task, make sure these 3 files are present:
2. Download and place the folder [ruemonge428](https://bitbucket.org/hayko/varcity3dchallenge/src/master/data/ruemonge428/)
under `data/`. For the 3D segmentation task, make sure these 3 files are present:
* `pcl.ply`
* `pcl_gt_train.ply`
* `pcl_gt_test.ply`
Expand Down

0 comments on commit f821913

Please sign in to comment.