- Compiler with C++14 support
- CMake>=3.23
- CUDA toolkit (optional)
pyTAGI
is a Python wrapper of C++/CUDA backend for TAGI method. The developers can install either the distributed or local versions of pyTAGI
. Currently pyTAGI
only supports Python version >=3.9 on both MacOS and Ubuntu.
We recommend installing miniconda for managing Python environment, yet pyTAGI
works well with other alternatives.
- Install miniconda by following these instructions
- Create a conda environment
conda create --name your_env_name python=3.10
- Activate conda environment
conda activate your_env_name
- Create conda environment
- Install requirements
pip install -r requirements.txt
- Install
pyTAGI
pip install pytagi
- Test
pyTAGI
packagepython -m python_examples.regression_runner
NOTE: This PyPI distributed version does not require the codebase in this repository. The developers can create their own applications (see python_examples).
- Clone this repository. Note that
git submodule
command allows cloning pybind11 which is the binding python package of C++/CUDA.git clone https://github.com/lhnguyen102/cuTAGI.git cd cuTAGI git submodule update --init --recursive
- Create conda environment
- Install requirements
pip install -r requirements.txt
- Install
pyTAGI
packagepip install .
- Test
pyTAGI
packagepython -m python_examples.regression_runner
cuTAGI
is the native version implemented in C++/CUDA for TAGI method. We highly recommend installing cuTAGI using Docker method to facilitate the installation.
- Install Docker by following these instructions
- Build docker image
- CPU build
bash bin/build.sh
- CUDA build
bash bin/build.sh -d cuda
*NOTE: During the build and run, make sure that Docker desktop application is opened. The commands for runing tasks such as classification and regression can be found here
-
Install CUDA toolkit >=10.1 in
/usr/local/
and add the CUDA location to PATH. For example, adding the following to your~/.bashrc
export PATH="/usr/local/cuda-10.1/bin:$PATH" export LD_LIBRARY_PATH="/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH"
-
Install GCC compiler by entering this line in
Terminal
sudo apt install g++
-
Install CMake by following these instructions
-
Build the project using CMake by the folder
cuTAGI
and entering these lines inTerminal
cmake . -B build cmake --build build --config RelWithDebInfo -j 16
-
Download and install MS Visual Studio 2019 community and C/C++ by following these instructions
-
Install CUDA toolkit >=10.1 and add CUDA location to Environment variables (see Step 5.3)
-
Copy all extenstion files from CUDA to MS Visual Studio. See this link for further details.
COPY FROM C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\visual_studio_integration\MSBuildExtensions TO C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations
-
Download and install CMake Windows x64 Installer and add the install directory (e.g.,
C:\Program Files\CMake\bin
) to PATH in Environment variables -
Add CMake CUDA compiler to Environment variables.
variable = CMAKE_CUDA_COMPILER value = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe
-
Build the project using CMake by navigating to the folder
cuTAGI
and entering these lines inCommand Prompt
cmake . -B build cmake --build build --config RelWithDebInfo -j 16
*NOTE: Users must enter the CUDA version installed on their machine. Here, we illustrate the installation with CUDA version v10.1 (see Step 1 for Ubuntu and 3 & 5 for Windows).
-
Install gcc and g++ via
Terminal
brew install gcc
-
Install CMake by following these instructions
-
Add CMake to PATH. Add the following line to your
.zshrc
fileexport PATH="/Applications/CMake.app/Contents/bin/:$PATH"
-
Build the project using CMake by the folder
cuTAGI
and entering these lines inTerminal
cmake . -B build cmake --build build --config RelWithDebInfo -j 16
- Install gcc and g++ w.r.t operating system such as Ubuntu, Window, and Mac OS
- Install CMake
- Install the following prerequites
- Visual Studio Code
- C++ extension for VS Code
- CMake Tools extension for VS Code