Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Instructions for installing with dependencies from conda #3016

Merged
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ Note: the Intel(R) oneAPI components listed here can be installed together throu

https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html

All of these dependencies can alternatively be installed through the `conda` software, but doing so will require a few additional setup steps - see [Conda Development Environment Setup](https://github.com/uxlfoundation/oneDAL/blob/main/INSTALL.md#conda-development-environment-setup) for details.

## Docker Development Environment

[Docker file](https://github.com/uxlfoundation/oneDAL/tree/main/dev/docker) with the oneDAL development environment
is available as an alternative to the manual setup.

## Installation Steps


1. Clone the sources from GitHub\* as follows:

git clone https://github.com/uxlfoundation/oneDAL.git
Expand Down Expand Up @@ -195,3 +199,72 @@ For example, in a Linux platform, assuming one wishes to execute the `adaboost_d
```shell
./_cmake_results/intel_intel64_so/adaboost_dense_batch
```

## Conda Development Environment Setup

The previous instructions assumed system-wide installs of the necessary dependencies. These can also be installed at a user-level through the `conda` or [mamba](https://github.com/conda-forge/miniforge) ecosystems.

First, create a conda environment for building oneDAL, after `conda` has been installed:

```shell
conda create -y -n onedal_env
conda activate onedal_env
```

Then, install the necessary dependencies from the appropriate channels with `conda`:

* Linux:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Linux:
**Linux\***:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't appear to render correctly:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified the 4 occurrences to use the formatting you're suggesting but inside bullet points.


```shell
conda install -y \
-c https://software.repos.intel.com/python/conda/ \ `# Intel's repository`
-c conda-forge \ `# conda-forge, for tools like 'make'`
make python>=3.9 \ `# used by the build system`
dpcpp-cpp-rt dpcpp_linux-64 intel-sycl-rt \ `# Intel compiler packages`
tbb tbb-devel \ `# required TBB packages`
mkl mkl-devel mkl-static mkl-dpcpp mkl-devel-dpcpp \ `# required MKL packages`
cmake `# required to build the examples only`
```

* Windows:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Windows:
**Windows\***:


```bat
conda install -y^
-c https://software.repos.intel.com/python/conda/^
-c conda-forge^
make dos2unix python>=3.9^
dpcpp-cpp-rt dpcpp_win-64 intel-sycl-rt^
tbb tbb-devel^
mkl mkl-devel mkl-static mkl-dpcpp mkl-devel-dpcpp^
cmake
```

Then modify the relevant environment variables to point to the conda-installed libraries:

* Linux:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Linux:
**Linux\***:


```shell
export MKLROOT=${CONDA_PREFIX}
export TBBROOT=${CONDA_PREFIX}
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}"
export LIBRARY_PATH="${CONDA_PREFIX}/lib:${LIBRARY_PATH}"
export CPATH="${CONDA_PREFIX}/include:${CPATH}"
export PATH="${CONDA_PREFIX}/bin:${PATH}"
export PKG_CONFIG_PATH="${CONDA_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
export CMAKE_PREFIX_PATH="${CONDA_PREFIX}/lib/cmake:${CMAKE_PREFIX_PATH}"
```

* windows:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* windows:
**Windows\***:


```bat
set MKLROOT=%CONDA_PREFIX%\Library
set TBBROOT=%CONDA_PREFIX%\Library
set "LD_LIBRARY_PATH=%CONDA_PREFIX%\Library\lib;%LD_LIBRARY_PATH%"
set "LIBRARY_PATH=%CONDA_PREFIX%\Library\lib;%LIBRARY_PATH%"
set "CPATH=%CONDA_PREFIX%\Library\include;%CPATH%"
set "PATH=%CONDA_PREFIX%\Library\bin;%PATH%"
set "PKG_CONFIG_PATH=%CONDA_PREFIX%\Library\lib\pkgconfig;%PKG_CONFIG_PATH%"
set "CMAKE_PREFIX_PATH=%CONDA_PREFIX%\Library\lib\cmake;%CMAKE_PREFIX_PATH%"
```

After that, it should be possible to build oneDAL and run the examples using the ICX compiler and the oneMKL libraries as per the instructions.
Loading