Skip to content

Commit

Permalink
DOC: Instructions for installing with dependencies from conda (#3016)
Browse files Browse the repository at this point in the history
* instructions for installing with conda dependencies

* correct conda command

* more details

* corrections

* remove MPI, not required

* improve instructions

* formatting
  • Loading branch information
david-cortes-intel authored Dec 18, 2024
1 parent 2ac143b commit f077d53
Showing 1 changed file with 73 additions and 0 deletions.
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\***:

```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\***:

```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\***:

```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\***:

```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.

0 comments on commit f077d53

Please sign in to comment.