@@ -12,92 +12,99 @@ import TabItem from '@theme/TabItem';
1212:::
1313
1414## Cortex.cpp Installation
15- Cortex.cpp offers two installer types:
16- - Network Installers download a minimal system and require an internet connection to fetch packages during installation.
17- - Local Installers include all necessary packages, enabling offline installation without internet access.
1815:::info
19- Before installation, make sure that you have met the required [ dependencies] ( #dependencies ) and [ hardware] ( #hardware ) to run Cortex.
16+ Before installation, make sure that you have met the [ minimum requirements] ( /docs/installation#minimum-requirements ) to run Cortex.
17+ This instruction is for stable releases. For beta and nightly releases, please replace ` cortex ` with ` cortex-beta ` and ` cortex-nightly ` , respectively.
2018:::
21- 1 . Download the MacOs installer:
22- - Stable: https://github.com/janhq/cortex.cpp/releases
23- - Beta: https://github.com/janhq/cortex.cpp/releases
24- - Nightly: https://github.com/janhq/cortex.cpp/releases
25- 2 . Ensure that Cortex.cpp is sucessfulyy installed:
26- ``` bash
27- # Stable
28- cortex
2919
30- # Beta
31- cortex-beta
20+ 1 . Download the Linux installer:
21+ - From release: https://github.com/janhq/cortex.cpp/releases
22+ - From quick download links:
23+ - Local installer ` .deb ` :
24+ - Stable: https://app.cortexcpp.com/download/latest/mac-universal-local
25+ - Beta: https://app.cortexcpp.com/download/beta/mac-universal-local
26+ - Nightly: https://app.cortexcpp.com/download/nightly/mac-universal-local
27+ - Network installer ` .deb ` :
28+ - Stable: https://app.cortexcpp.com/download/latest/mac-universal-network
29+ - Beta: https://app.cortexcpp.com/download/beta/mac-universal-network
30+ - Nightly: https://app.cortexcpp.com/download/nightly/mac-universal-network
31+ - Binary:
32+ - Stable: https://app.cortexcpp.com/download/latest/mac-universal-binary
33+ - Beta: https://app.cortexcpp.com/download/beta/mac-universal-binary
34+ - Nightly: https://app.cortexcpp.com/download/nightly/mac-universal-binary
3235
33- # Nightly
34- cortex-nightly
35- ```
36+ 2 . Install Cortex.cpp by double-clicking the pkg downloaded file.
37+
38+ 3 . Ensure that Cortex.cpp is sucessfulyy installed:
39+ ``` bash
40+ # Stable
41+ cortex -v
42+ ```
3643
3744### Data Folder
3845By default, Cortex.cpp is installed in the following directory:
3946```
4047# Binary Location
41- /usr/local/bin/cortexcpp<env>
48+ /usr/local/bin/cortex
49+ /usr/local/bin/cortex-server
50+ /usr/local/bin/cortex-uninstall.sh
4251
4352# Application Data (Engines, Models and Logs folders)
44- /Users/<username>/.cortexcpp<env>
53+ /Users/<username>/cortexcpp
54+
55+ # Configuration File
56+ /Users/<username>/.cortexrc
4557```
4658## Uninstall Cortex.cpp
4759Run the uninstaller script:
4860``` bash
49- # Stable version
5061sudo sh cortex-uninstall.sh
51-
52- # Beta version
53- sudo sh cortex-beta-uninstall.sh
54-
55- # Stable version
56- sudo sh cortex-nightly-uninstall.sh
5762```
63+
5864:::info
5965The script requires sudo permission.
6066:::
67+
6168## Build from Source
62- 1 . Clone the Cortex.cpp repository [ here] ( https://github.com/janhq/cortex.cpp ) .
63- 2 . Navigate to the ` engine > vcpkg ` folder.
64- 3 . Configure the vpkg:
6569
66- ``` bash
67- cd vcpkg
68- ./bootstrap-vcpkg.sh
69- vcpkg install
70- ```
71- 4 . Build the Cortex.cpp inside the ` build ` folder:
70+ ### Prerequisites
71+ - CMake >= 3.10
72+ - gcc/g++ >= 9
73+ - ninja-build
74+ - make-gnu
7275
73- ``` bash
74- mkdir build
75- cd build
76- cmake .. -DCMAKE_TOOLCHAIN_FILE=path_to_vcpkg_folder/vcpkg/scripts/buildsystems/vcpkg.cmake
77- make -j4
78- ```
79- 5 . Use Visual Studio with the C++ development kit to build the project using the files generated in the ` build ` folder.
80- 6 . Verify that Cortex.cpp is installed correctly by getting help information.
76+ ### Build Cortex.cpp
8177
82- ``` sh
83- # Get the help information
84- cortex -h
85- ```
78+ 1 . ** Clone the Cortex Repository**
79+ ``` bash
80+ git clone https://github.com/janhq/cortex.cpp.git
81+ cd cortex.cpp
82+ git submodule update --init
83+ ```
84+ 2 . Build the Cortex.cpp :
85+
86+ ``` bash
87+ cd engine
88+ make configure-vcpkg
89+
90+ # Mac silicon
91+ make build CMAKE_EXTRA_FLAGS=" -DCORTEX_CPP_VERSION=latest -DCMAKE_BUILD_TEST=OFF -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
92+
93+ # Mac Intel
94+ make build CMAKE_EXTRA_FLAGS=" -DCORTEX_CPP_VERSION=latest -DCMAKE_BUILD_TEST=OFF -DMAC_ARM64=ON -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
95+ ```
96+
97+ 3 . Verify that Cortex.cpp is builded correctly by getting help information.
8698
87- ## Prerequisites
88-
89- ### Dependencies
90- - Homebrew
91-
92- ### Hardware
93- #### Operating System
94- - MacOSX 13.6 or higher.
95- #### CPU
96- - Mac Intel CPU
97- - Mac Apple Silicon
98- #### RAM
99- - 8GB for running up to 3B models.
100- - 16GB for running up to 7B models.
101- - 32GB for running up to 13B models.
102- #### Disk
103- - At least 10GB for app storage and model download.
99+ ``` sh
100+ # Get the help information
101+ ./build/cortex -h
102+ ```
103+
104+ ## Update cortex to latest version
105+ :::info
106+ The script requires sudo permission.
107+ :::
108+ ``` bash
109+ sudo cortex update
110+ ```
0 commit comments