Linux Installation
🚧 Cortex.cpp is currently under development. Our documentation outlines the intended behavior of Cortex, which may not yet be fully implemented in the codebase.
Cortex.cpp Installation​
Before installation, make sure that you have met the minimum requirements to run Cortex.
This instruction is for stable releases. For beta and nightly releases, please replace cortex
with cortex-beta
and cortex-nightly
, respectively.
Prerequisites​
- OpenMPI
- curl
- jq
- tar
Install Cortex.cpp​
- Install cortex with one command
-
Linux debian base distros
# Network installercurl -s https://raw.githubusercontent.com/janhq/cortex/main/engine/templates/linux/install.sh | sudo bash -s# Local installercurl -s https://raw.githubusercontent.com/janhq/cortex/main/engine/templates/linux/install.sh | sudo bash -s -- --deb_local -
Other linux distros
curl -s https://raw.githubusercontent.com/janhq/cortex/main/engine/templates/linux/install.sh | sudo bash -s -
Parameters
--channel <channel_name>
cortex channel will be installedstable
,beta
ornightly
. Default vaule isstable
--version <version>
version cortex want to install Ex--version 1.0.2
. Default the script will get latest version of corresponding channel--is_update
the current command run is for update--deb_local
Using local installer for linux debian base distros
- Ensure that Cortex.cpp is sucessfulyy installed:
# Stablecortex -v
Data Folder​
By default, Cortex.cpp is installed in the following directory:
# Binary Location/usr/bin/cortex/usr/bin/cortex-server# Application Data (Engines, Models and Logs folders)/home/<username>/cortexcpp# Configuration File/home/<username>/.cortexrc
Uninstall Cortex.cpp​
# Stable versionsudo /usr/bin/cortex-uninstall.sh
Build from Source​
Prerequisites​
- OpenMPI
- CMake >= 3.10
- gcc/g++ >= 9
- ninja-build
- make-gnu
Build Cortex.cpp​
-
Clone the Cortex Repository
git clone https://github.com/janhq/cortex.cpp.gitcd cortex.cppgit submodule update --init -
Build the Cortex.cpp :
cd enginemake configure-vcpkgmake build CMAKE_EXTRA_FLAGS="-DCORTEX_CPP_VERSION=$(git rev-parse HEAD) -DCMAKE_BUILD_TEST=OFF -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake" -
Verify that Cortex.cpp is builded correctly by getting help information.
# Get the help information./build/cortex -h
Update cortex to latest version​
🚧 The script requires sudo permissions and works only if the user follows the installation instructions above or if the cortex binary file and the cortex-server binary file are installed in /usr/bin for all Linux distributions. If your binary files are located in a different folder, please manually update the binary files.
sudo cortex update