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

Commit 054fd75

Browse files
committed
fix: macos updater
1 parent c179e67 commit 054fd75

File tree

5 files changed

+30
-5
lines changed

5 files changed

+30
-5
lines changed

.github/workflows/nightly-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
tags: menloltd/cortex:nightly-${{ needs.get-update-version.outputs.new_version }}
125125

126126
noti-discord-nightly-and-update-url-readme:
127-
needs: [build-macos, build-windows-x64, build-linux-x64, get-update-version, set-public-provider, get-cortex-llamacpp-latest-version, update-latest-version]
127+
needs: [build-macos, build-windows-x64, build-linux-x64, get-update-version, set-public-provider, get-cortex-llamacpp-latest-version, update-latest-version, build-docker-x64]
128128
secrets: inherit
129129
if: github.event_name == 'schedule'
130130
uses: ./.github/workflows/template-noti-discord.yaml
@@ -133,7 +133,7 @@ jobs:
133133
new_version: ${{ needs.get-update-version.outputs.new_version }}
134134

135135
noti-discord-manual:
136-
needs: [build-macos, build-windows-x64, build-linux-x64, get-update-version, set-public-provider, get-cortex-llamacpp-latest-version]
136+
needs: [build-macos, build-windows-x64, build-linux-x64, get-update-version, set-public-provider, get-cortex-llamacpp-latest-version, build-docker-x64]
137137
secrets: inherit
138138
if: github.event_name == 'workflow_dispatch' && github.event.inputs.public_provider == 'aws-s3'
139139
uses: ./.github/workflows/template-noti-discord.yaml

.github/workflows/template-build-docker-x64.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,17 @@ jobs:
5959
tags: ${{ inputs.tags }}
6060
build-args: |
6161
CORTEX_CPP_VERSION=${{ inputs.new_version }}
62-
CMAKE_EXTRA_FLAGS=${{ inputs.cmake-extra-flags }}
62+
CMAKE_EXTRA_FLAGS=${{ inputs.cmake-extra-flags }}
63+
64+
- name: Update Docker Hub overview
65+
env:
66+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
67+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
68+
run: |
69+
README_CONTENT=$(cat docker/README.md | tr -d '\r' | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/"/\\"/g')
70+
71+
curl -X PATCH \
72+
-H "Content-Type: application/json" \
73+
-H "Authorization: JWT $(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'"$DOCKERHUB_USERNAME"'", "password": "'"$DOCKERHUB_TOKEN"'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)" \
74+
-d "{\"full_description\": \"$README_CONTENT\"}" \
75+
https://hub.docker.com/v2/repositories/menloltd/cortex/

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +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 }}
4546
- Github action run: https://github.com/janhq/cortex.cpp/actions/runs/${{ env.RUNNER_ID }}

docker/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ This guide will help you set up and run Cortex using Docker.
77
- nvidia-container-toolkit (for GPU support)
88

99
### Instructions
10+
11+
#### Pull Cortex Docker Image from Docker Hub
12+
1. Pull the Cortex Docker image from Docker Hub
13+
```bash
14+
# Pull the latest image
15+
docker pull menloltd/cortex:latest
16+
17+
docker pull menloltd/cortex:1.0.1-224
18+
```
19+
20+
#### Build and Run Cortex Docker Container from Dockerfile
1021
1. Clone the Cortex repository
1122
```bash
1223
git clone https://github.com/janhq/cortex.cpp.git

engine/cli/commands/cortex_upd_cmd.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ std::string GetNightlyInstallerName(const std::string& v,
5555
// C:\Users\vansa\AppData\Local\Temp\cortex\cortex-windows-amd64-network-installer.exe
5656
std::string GetInstallCmd(const std::string& exe_path) {
5757
#if defined(__APPLE__) && defined(__MACH__)
58-
return "sudo touch /var/tmp/cortex_installer_skip_postinstall && sudo installer "
58+
return "sudo touch /var/tmp/cortex_installer_skip_postinstall_check && sudo installer "
5959
"-pkg " +
6060
exe_path +
61-
" -target / && sudo rm /var/tmp/cortex_installer_skip_postinstall";
61+
" -target / && sudo rm /var/tmp/cortex_installer_skip_postinstall_check";
6262
#elif defined(__linux__)
6363
return "echo -e \"n\\n\" | sudo SKIP_POSTINSTALL=true apt install -y "
6464
"--allow-downgrades " +

0 commit comments

Comments
 (0)