Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 63ebf76

Browse files
committed
Merge branch 'feat/linux-bash-install-script' of github.com:janhq/cortex.cpp into feat/linux-bash-install-script
2 parents d9376ed + 856128c commit 63ebf76

File tree

17 files changed

+628
-434
lines changed

17 files changed

+628
-434
lines changed

.github/workflows/beta-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
new_version: ${{ needs.get-update-version.outputs.new_version }}
9090
runs-on: ubuntu-latest
9191
cmake-extra-flags: "-DCORTEX_VARIANT=prod"
92-
tags: "menloltd/cortex:${{ needs.get-update-version.outputs.new_version }}"
92+
tags: "menloltd/cortex:beta-${{ needs.get-update-version.outputs.new_version }}"
9393

9494
update_release:
9595
needs: [get-update-version, create-draft-release, build-macos, build-windows-x64, build-linux-x64]
@@ -140,4 +140,5 @@ jobs:
140140
- Network Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-linux-amd64-network-installer.deb
141141
- Local Installer: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-linux-amd64-local-installer.deb
142142
- Binary: https://github.com/janhq/cortex.cpp/releases/download/v${{ env.VERSION }}/cortex-${{ env.VERSION }}-linux-amd64.tar.gz
143+
- Docker: menloltd/cortex:beta-${{ env.VERSION }}
143144
- Github Release: https://github.com/janhq/cortex.cpp/releases/tag/v${{ env.VERSION }}

.github/workflows/template-noti-discord.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ jobs:
4242
- Network Installer: https://delta.jan.ai/cortex/v${{ env.VERSION }}/linux-amd64/cortex-${{ env.VERSION }}-linux-amd64-network-installer.deb
4343
- Local Installer: https://delta.jan.ai/cortex/v${{ env.VERSION }}/linux-amd64/cortex-${{ env.VERSION }}-linux-amd64-local-installer.deb
4444
- Binary: https://delta.jan.ai/cortex/v${{ env.VERSION }}/linux-amd64/cortex-nightly.tar.gz
45-
- Docker: menloltd/cortex:${{ env.VERSION }}
45+
- Docker: menloltd/cortex:nightly-${{ env.VERSION }}
4646
- Github action run: https://github.com/janhq/cortex.cpp/actions/runs/${{ env.RUNNER_ID }}

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,18 @@ Cortex also has a [Network Installer](#network-installer) which downloads the ne
5555

5656
<h4>
5757
<img src='https://github.com/janhq/docs/blob/main/static/img/linux.png' style="height:15px; width: 15px" />
58-
Linux:
58+
Linux debian based distros:
5959
<a href='https://app.cortexcpp.com/download/latest/linux-amd64-local'><b>cortex-linux-local-installer.deb</b></a>
6060
</h4>
6161

6262
- For Linux: Download the installer and run the following command in terminal:
6363

6464
```bash
65-
sudo apt install ./cortex-local-installer.deb
65+
# Linux debian based distros
66+
curl -s https://raw.githubusercontent.com/janhq/cortex/dev/engine/templates/linux/install.sh | sudo bash -s -- --deb_local
67+
68+
# Other Linux distros
69+
curl -s https://raw.githubusercontent.com/janhq/cortex/dev/engine/templates/linux/install.sh | sudo bash -s
6670
```
6771

6872
- The binary will be installed in the `/usr/bin/` directory.
@@ -108,7 +112,7 @@ Once downloaded, the model `.gguf` and `model.yml` files are stored in `~\cortex
108112
| Model /Engine | llama.cpp | Command |
109113
| -------------- | --------------------- | ----------------------------- |
110114
| phi-3.5 || cortex run phi3.5 |
111-
| llama3.2 || cortex run llama3.1 |
115+
| llama3.2 || cortex run llama3.2 |
112116
| llama3.1 || cortex run llama3.1 |
113117
| codestral || cortex run codestral |
114118
| gemma2 || cortex run gemma2 |
@@ -160,7 +164,7 @@ Cortex.cpp is available with a Network Installer, which is a smaller installer b
160164

161165
<h4>
162166
<img src='https://github.com/janhq/docs/blob/main/static/img/linux.png' style="height:14px; width: 15px" />
163-
Linux:
167+
Linux debian based distros:
164168
<a href='https://app.cortexcpp.com/download/latest/linux-amd64-network'><b>cortex-linux-network-installer.deb</b></a>
165169
</h4>
166170

@@ -181,7 +185,7 @@ Cortex releases 2 preview versions for advanced users to try new features early
181185
<td style="text-align:center"><b>Version</b></td>
182186
<td style="text-align:center"><b>Windows</b></td>
183187
<td style="text-align:center"><b>MacOS</b></td>
184-
<td style="text-align:center"><b>Linux</b></td>
188+
<td style="text-align:center"><b>Linux debian based distros</b></td>
185189
</tr>
186190
<tr style="text-align:center">
187191
<td style="text-align:center"><b>Beta (Preview)</b></td>
@@ -234,7 +238,7 @@ Cortex releases 2 preview versions for advanced users to try new features early
234238
<td style="text-align:center"><b>Version Type</b></td>
235239
<td style="text-align:center"><b>Windows</b></td>
236240
<td style="text-align:center"><b>MacOS</b></td>
237-
<td style="text-align:center"><b>Linux</b></td>
241+
<td style="text-align:center"><b>Linux debian based distros</b></td>
238242
</tr>
239243
<tr style="text-align:center">
240244
<td style="text-align:center"><b>Beta (Preview)</b></td>

docs/docs/installation/linux.mdx

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,43 +20,35 @@ This instruction is for stable releases. For beta and nightly releases, please r
2020

2121
### Prerequisites
2222
- OpenMPI
23+
- curl
24+
- jq
25+
- tar
2326

2427
### Install Cortex.cpp
2528

26-
1. Download the Linux installer:
27-
- From release: https://github.com/janhq/cortex.cpp/releases
28-
- From quick download links:
29-
- Local installer `.deb`:
30-
- Stable: https://app.cortexcpp.com/download/latest/linux-amd64-local
31-
- Beta: https://app.cortexcpp.com/download/beta/linux-amd64-local
32-
- Nightly: https://app.cortexcpp.com/download/nightly/linux-amd64-local
33-
- Network installer `.deb`:
34-
- Stable: https://app.cortexcpp.com/download/latest/linux-amd64-network
35-
- Beta: https://app.cortexcpp.com/download/beta/linux-amd64-network
36-
- Nightly: https://app.cortexcpp.com/download/nightly/linux-amd64-network
37-
- Binary:
38-
- Stable: https://app.cortexcpp.com/download/latest/linux-amd64-binary
39-
- Beta: https://app.cortexcpp.com/download/beta/linux-amd64-binary
40-
- Nightly: https://app.cortexcpp.com/download/nightly/linux-amd64-binary
41-
42-
2. Install Cortex.cpp using the following command:
43-
```bash
44-
# Installer
45-
sudo apt install ./cortex-<version>-linux-amd64-network-installer.deb
29+
1. Install cortex with one command
4630

31+
- Linux debian base distros
32+
```bash
33+
# Network installer
34+
curl -s https://raw.githubusercontent.com/janhq/cortex/dev/engine/templates/linux/install.sh | sudo bash -s
4735

48-
# Binary
49-
tar -xvf cortex-<version>-linux-amd64.tar.gz
50-
cd cortex
51-
sudo mv cortex /usr/bin/cortex
52-
sudo chmod +x /usr/bin/Cortexs
53-
sudo mv cortex-server /usr/bin/cortex-server
36+
# Local installer
37+
curl -s https://raw.githubusercontent.com/janhq/cortex/dev/engine/templates/linux/install.sh | sudo bash -s -- --deb_local
38+
```
5439

55-
## For binary, you need to install engine manually after extracting the binary
56-
cortex engines install llama-cpp
57-
```
40+
- Other linux distros
41+
```bash
42+
curl -s https://raw.githubusercontent.com/janhq/cortex/dev/engine/templates/linux/install.sh | sudo bash -s
43+
```
44+
45+
- Parameters
46+
- `--channel <channel_name>` cortex channel will be installed `stable`, `beta` or `nightly`. Default vaule is `stable`
47+
- `--version <version>` version cortex want to install Ex `--version 1.0.2`. Default the script will get latest version of corresponding channel
48+
- `--is_update` the current command run is for update
49+
- `--deb_local` Using local installer for linux debian base distros
5850

59-
3. Ensure that Cortex.cpp is sucessfulyy installed:
51+
2. Ensure that Cortex.cpp is sucessfulyy installed:
6052
```bash
6153
# Stable
6254
cortex -v
@@ -79,7 +71,7 @@ By default, Cortex.cpp is installed in the following directory:
7971
## Uninstall Cortex.cpp
8072
```bash
8173
# Stable version
82-
sudo apt remove cortexcpp
74+
sudo /usr/bin/cortex-uninstall.sh
8375
```
8476

8577
## Build from Source
@@ -116,7 +108,7 @@ sudo apt remove cortexcpp
116108

117109
## Update cortex to latest version
118110
:::info
119-
The script requires sudo permission. Supported for debians based systems only (Ubuntu, Debian, etc).
111+
The script requires sudo permission. Supported for all linux distros.
120112
:::
121113
```bash
122114
sudo cortex update

0 commit comments

Comments
 (0)