Mac Installation
Before installation, make sure that you have met the minimum requirements to run Cortex.
The instructions below are for stable releases only. For beta and nightly releases, please replace cortex
with cortex-beta
and cortex-nightly
, respectively.
- 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 by double-clicking the pkg downloaded file.
-
Ensure that Cortex.cpp is sucessfulyy installed:
# Stablecortex -v
Data Folder
By default, Cortex.cpp is installed in the bin
directory:
# Binary Location/usr/local/bin/cortex/usr/local/bin/cortex-server/usr/local/bin/cortex-uninstall.sh
The application data which includes Engines, Models and Logs will be installed in your home directory.
/Users/<username>/cortexcpp
The configuration file, .cortexrc
, will also be in your home directory.
/Users/<username>/.cortexrc
Uninstall Cortex.cpp
Run the uninstaller script:
sudo sh cortex-uninstall.sh
The script requires sudo permission.
Build from Source
Prerequisites
- 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 :
- Mac Silicon
- Mac Intel
cd enginemake configure-vcpkgmake build CMAKE_EXTRA_FLAGS="-DCORTEX_CPP_VERSION=latest -DCMAKE_BUILD_TEST=OFF -DMAC_ARM64=ON -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
cd enginemake configure-vcpkgmake build CMAKE_EXTRA_FLAGS="-DCORTEX_CPP_VERSION=latest -DCMAKE_BUILD_TEST=OFF -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
-
Verify that Cortex.cpp was built correctly by using
-h
flag to call the help info.# Get the help information./build/cortex -h
Update Cortex
Cortex can be updated in-place without any additional scripts. In addition, cortex will let you know if there is a new version of itself the next time you start a server.
The script requires sudo permission.
sudo cortex update