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
Install Cortex.cpp​
-
Download the Linux installer:
- From release: https://github.com/janhq/cortex.cpp/releases
- From quick download links:
- Local installer
.deb
: - Network installer
.deb
: - Binary:
- Local installer
-
Install Cortex.cpp using the following command:
# Installersudo apt install ./cortex-<version>-linux-amd64-network-installer.deb# Binarytar -xvf cortex-<version>-linux-amd64.tar.gzcd cortexsudo mv cortex /usr/bin/cortexsudo chmod +x /usr/bin/Cortexssudo mv cortex-server /usr/bin/cortex-server## For binary, you need to install engine manually after extracting the binarycortex engines install llama-cpp -
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 apt remove cortexcpp
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 permission. Supported for debians based systems only (Ubuntu, Debian, etc).
sudo cortex update