Skip to content

Commit

Permalink
Force ninja for installation (issue #208)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischoy committed Apr 7, 2021
1 parent 93e4db7 commit 5dfb990
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ We visualized a sparse tensor network operation on a sparse tensor, convolution,
- CUDA >= 10.1.243 and **the same CUDA version used for pytorch** (e.g. if you use conda cudatoolkit=11.1, use CUDA=11.1 for MinkowskiEngine compilation)
- pytorch >= 1.7 (if you use conda, install with `conda install -y -c conda-forge -c pytorch pytorch=1.8.1 cudatoolkit=11.1`)
- python >= 3.6
- ninja (for installation)
- GCC >= 7


Expand All @@ -75,7 +76,7 @@ First, install pytorch following the [instruction](https://pytorch.org). Next, i

```
sudo apt install build-essential python3-dev libopenblas-dev
pip install torch
pip install torch ninja
pip install -U MinkowskiEngine --install-option="--blas=openblas" -v --no-deps
# For pip installation from the latest source
Expand Down Expand Up @@ -130,7 +131,7 @@ sudo apt install build-essential python3-dev libopenblas-dev
curl https://bootstrap.pypa.io/get-pip.py | python3
# Get pip and install python requirements
python3 -m pip install torch numpy
python3 -m pip install torch numpy ninja
git clone https://github.com/NVIDIA/MinkowskiEngine.git
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ def _argparse(pattern, argv, is_flag=True, is_list=False):

debug, argv = _argparse("--debug", argv)

USE_NINJA = os.getenv("USE_NINJA") == "0"
HERE = Path(os.path.dirname(__file__)).absolute()
SRC_PATH = HERE / "src"

Expand Down Expand Up @@ -320,7 +319,7 @@ def _argparse(pattern, argv, is_flag=True, is_list=False):
package_dir={"MinkowskiEngine": "./MinkowskiEngine"},
ext_modules=ext_modules,
include_dirs=[str(SRC_PATH), str(SRC_PATH / "3rdparty"), *include_dirs],
cmdclass={"build_ext": BuildExtension},
cmdclass={"build_ext": BuildExtension.with_options(use_ninja=True)},
author="Christopher Choy",
author_email="chrischoy@ai.stanford.edu",
description="a convolutional neural network library for sparse tensors",
Expand Down

0 comments on commit 5dfb990

Please sign in to comment.