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

Commit 51f9123

Browse files
fix: docker CI (#2051)
* fix: docker CI * fix: create cortexcpp folder --------- Co-authored-by: sangjanai <[email protected]>
1 parent 57004f5 commit 51f9123

File tree

4 files changed

+47
-6
lines changed

4 files changed

+47
-6
lines changed

.github/workflows/cortex-cpp-quality-gate.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,23 @@ jobs:
137137
138138
139139
- name: Run setup config
140+
if: runner.os != 'Linux'
140141
run: |
141142
cd engine
142143
echo "huggingFaceToken: ${{ secrets.HUGGINGFACE_TOKEN_READ }}" > ~/.cortexrc
143144
echo "gitHubToken: ${{ secrets.PAT_SERVICE_ACCOUNT }}" >> ~/.cortexrc
144145
# ./build/cortex
145146
cat ~/.cortexrc
146147
148+
- name: Run setup config
149+
if: runner.os == 'Linux'
150+
run: |
151+
cd engine
152+
echo "huggingFaceToken: ${{ secrets.HUGGINGFACE_TOKEN_READ }}" > ~/.config/cortexcpp/.cortexrc
153+
echo "gitHubToken: ${{ secrets.PAT_SERVICE_ACCOUNT }}" >> ~/.config/cortexcpp/.cortexrc
154+
# ./build/cortex
155+
cat ~/.config/cortexcpp/.cortexrc
156+
147157
- name: Run unit tests
148158
run: |
149159
cd engine
@@ -152,13 +162,24 @@ jobs:
152162
GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }}
153163

154164
- name: Run setup config
165+
if: runner.os != 'Linux'
155166
run: |
156167
cd engine
157168
echo "apiServerPort: 3928" > ~/.cortexrc
158169
echo "huggingFaceToken: ${{ secrets.HUGGINGFACE_TOKEN_READ }}" >> ~/.cortexrc
159170
echo "gitHubToken: ${{ secrets.PAT_SERVICE_ACCOUNT }}" >> ~/.cortexrc
160171
# ./build/cortex
161172
cat ~/.cortexrc
173+
174+
- name: Run setup config
175+
if: runner.os == 'Linux'
176+
run: |
177+
cd engine
178+
echo "apiServerPort: 3928" > ~/.config/cortexcpp/.cortexrc
179+
echo "huggingFaceToken: ${{ secrets.HUGGINGFACE_TOKEN_READ }}" >> ~/.config/cortexcpp/.cortexrc
180+
echo "gitHubToken: ${{ secrets.PAT_SERVICE_ACCOUNT }}" >> ~/.config/cortexcpp/.cortexrc
181+
# ./build/cortex
182+
cat ~/.config/cortexcpp/.cortexrc
162183
163184
- name: Run e2e tests
164185
if: github.event_name != 'schedule' && runner.os != 'Windows' && github.event.pull_request.draft == false
@@ -414,12 +435,21 @@ jobs:
414435
make build CMAKE_EXTRA_FLAGS="${{ matrix.cmake-flags }}" BUILD_DEPS_CMAKE_EXTRA_FLAGS="${{ matrix.build-deps-cmake-flags }}"
415436
416437
- name: Run setup config
438+
if: runner.os != 'Linux'
417439
run: |
418440
cd engine
419441
echo "gitHubToken: ${{ secrets.GITHUB_TOKEN }}" > ~/.cortexrc
420442
# ./build/cortex
421443
cat ~/.cortexrc
422444
445+
- name: Run setup config
446+
if: runner.os == 'Linux'
447+
run: |
448+
cd engine
449+
echo "gitHubToken: ${{ secrets.GITHUB_TOKEN }}" > ~/.config/cortexcpp/.cortexrc
450+
# ./build/cortex
451+
cat ~/.config/cortexcpp/.cortexrc
452+
423453
- name: Run unit tests
424454
run: |
425455
cd engine
@@ -428,12 +458,22 @@ jobs:
428458
GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }}
429459

430460
- name: Run setup config
461+
if: runner.os != 'Linux'
431462
run: |
432463
cd engine
433464
echo "apiServerPort: 3928" > ~/.cortexrc
434465
echo "gitHubToken: ${{ secrets.GITHUB_TOKEN }}" > ~/.cortexrc
435466
# ./build/cortex
436467
cat ~/.cortexrc
468+
469+
- name: Run setup config
470+
if: runner.os == 'Linux'
471+
run: |
472+
cd engine
473+
echo "apiServerPort: 3928" > ~/.config/cortexcpp/.cortexrc
474+
echo "gitHubToken: ${{ secrets.GITHUB_TOKEN }}" > ~/.config/cortexcpp/.cortexrc
475+
# ./build/cortex
476+
cat ~/.config/cortexcpp/.cortexrc
437477
438478
- name: Run e2e tests
439479
if: github.event_name != 'schedule' && runner.os != 'Windows' && github.event.pull_request.draft == false

.github/workflows/test-cortexso-model-hub.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
run: |
6868
cd engine
6969
./build/cortex --version
70-
sed -i 's/huggingFaceToken: ""/huggingFaceToken: "${{ secrets.HUGGINGFACE_TOKEN_READ }}"/' ~/.cortexrc
70+
sed -i 's/huggingFaceToken: ""/huggingFaceToken: "${{ secrets.HUGGINGFACE_TOKEN_READ }}"/' ~/.config/cortexcpp/.cortexrc
7171
7272
- name: Run e2e tests
7373
run: |

docker/entrypoint.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
# Install cortex.llamacpp engine
44

5-
echo "apiServerHost: 0.0.0.0" > /root/.cortexrc
6-
echo "enableCors: true" >> /root/.cortexrc
5+
mkdir -p /root/.config/cortexcpp
6+
echo "apiServerHost: 0.0.0.0" > /root/.config/cortexcpp/.cortexrc
7+
echo "enableCors: true" >> /root/.config/cortexcpp/.cortexrc
78

89
# Start the cortex server
910
cortex start
@@ -15,6 +16,6 @@ cortex engines list
1516

1617

1718
# Keep the container running by tailing the log files
18-
tail -f /root/cortexcpp/logs/cortex.log &
19-
tail -f /root/cortexcpp/logs/cortex-cli.log &
19+
tail -f /root/.local/share/cortexcpp/logs/cortex.log &
20+
tail -f /root/.local/share/cortexcpp/logs/cortex-cli.log &
2021
wait

engine/e2e-test/api/engines/test_api_get_list_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def setup_and_teardown(self):
2424
def test_api_get_list_engines_successfully(self):
2525
# Data test
2626
engine= "llama-cpp"
27-
name= "linux-amd64-avx-cuda-11-7"
27+
name= "linux-amd64-avx"
2828
version= "v0.1.35-27.10.24"
2929

3030
data = {"version": version, "variant": name}

0 commit comments

Comments
 (0)