Commit b0c198dc authored by Preston Parry's avatar Preston Parry Committed by Francisco Massa

Update install example to avoid directory assumptions (#451)

The previous instruction examples assumed that the directory `~/github` existed, and did not include any check to create it if the directory did not exist. I updated to install in whatever directory the user is current in. 

I also updated to make it clear how the CUDA version is specified, and fixed a typo in activating the conda env.
parent f2b9a9a0
......@@ -18,7 +18,7 @@
# right path. From a clean conda env, this is what you need to do
conda create --name maskrcnn_benchmark
source activate maskrcnn_benchmark
conda activate maskrcnn_benchmark
# this installs the right pip and dependencies for the fresh python
conda install ipython
......@@ -28,22 +28,23 @@ pip install ninja yacs cython matplotlib
# follow PyTorch installation in https://pytorch.org/get-started/locally/
# we give the instructions for CUDA 9.0
conda install pytorch-nightly -c pytorch
conda install pytorch-nightly cudatoolkit=9.0 -c pytorch
export MASKRCNN_BENCHMARK_INSTALL_DIR=$PWD
# install torchvision
cd ~/github
cd $INSTALL_DIR
git clone https://github.com/pytorch/vision.git
cd vision
python setup.py install
# install pycocotools
cd ~/github
cd $INSTALL_DIR
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
python setup.py build_ext install
# install PyTorch Detection
cd ~/github
cd $INSTALL_DIR
git clone https://github.com/facebookresearch/maskrcnn-benchmark.git
cd maskrcnn-benchmark
# the following will install the lib with
......@@ -52,6 +53,8 @@ cd maskrcnn-benchmark
# re-build it
python setup.py build develop
unset MASKRCNN_BENCHMARK_INSTALL_DIR
# or if you are on macOS
# MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py build develop
```
......@@ -69,4 +72,4 @@ Build image with other CUDA and CUDNN versions:
Build and run image with built-in jupyter notebook(note that the password is used to log in jupyter notebook):
nvidia-docker build -t maskrcnn-benchmark-jupyter docker/docker-jupyter/
nvidia-docker run -td -p 8888:8888 -e PASSWORD=<password> -v <host-dir>:<container-dir> maskrcnn-benchmark-jupyter
\ No newline at end of file
nvidia-docker run -td -p 8888:8888 -e PASSWORD=<password> -v <host-dir>:<container-dir> maskrcnn-benchmark-jupyter
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment