Skip to content

Commit

Permalink
update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
grlee77 committed Nov 1, 2023
1 parent 4277ae7 commit 588cd24
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,19 +263,21 @@ conda install -y -c ${CONDA_BLD_DIR} -c conda-forge \

## Building a package (for distribution. Including a wheel package for pip)

**Build**

You can execute the following command to build a wheel file for pip.
**Wheel Build**

If you are using CUDA 12.x, please update pyproject.toml as follows before building the wheel
```bash
./run build_package
sed -i "s/cupy-cuda11x/cupy-cuda12x/g" python/cucim/pyproject.toml
```
This will switch the CuPy dependency to one based on CUDA 12.x instead of 11.x.

The command would use `./temp` folder as a local build folder and build a distribution package into `dist` folder using [dockcross](https://github.com/dockcross/dockcross)'s manylinux2014 docker image.
The wheel can then be build using.

`./run build_package` will reuse local `./temp` folder to reduce the build time.
```bash
python -m pip wheel python/cucim/ -w dist -vvv --no-deps --disable-pip-version-check
```

If C++ code or dependent packages are updated so the build is failing somehow, please retry it after deleting the `temp` folder under the repository root.
**Note:** It is possible to build the wheel in this way even without compiling the C++ library first, but in that case the `cucim.clara` module will not be importable.

**Install**

Expand Down

0 comments on commit 588cd24

Please sign in to comment.