diff --git a/.github/workflows/cortex-cpp-quality-gate.yml b/.github/workflows/cortex-cpp-quality-gate.yml index 68d4d9c09..2918840b6 100644 --- a/.github/workflows/cortex-cpp-quality-gate.yml +++ b/.github/workflows/cortex-cpp-quality-gate.yml @@ -137,6 +137,7 @@ jobs: - name: Run setup config + if: runner.os != 'Linux' run: | cd engine echo "huggingFaceToken: ${{ secrets.HUGGINGFACE_TOKEN_READ }}" > ~/.cortexrc @@ -144,6 +145,15 @@ jobs: # ./build/cortex cat ~/.cortexrc + - name: Run setup config + if: runner.os == 'Linux' + run: | + cd engine + echo "huggingFaceToken: ${{ secrets.HUGGINGFACE_TOKEN_READ }}" > ~/.config/cortexcpp/.cortexrc + echo "gitHubToken: ${{ secrets.PAT_SERVICE_ACCOUNT }}" >> ~/.config/cortexcpp/.cortexrc + # ./build/cortex + cat ~/.config/cortexcpp/.cortexrc + - name: Run unit tests run: | cd engine @@ -152,6 +162,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }} - name: Run setup config + if: runner.os != 'Linux' run: | cd engine echo "apiServerPort: 3928" > ~/.cortexrc @@ -159,6 +170,16 @@ jobs: echo "gitHubToken: ${{ secrets.PAT_SERVICE_ACCOUNT }}" >> ~/.cortexrc # ./build/cortex cat ~/.cortexrc + + - name: Run setup config + if: runner.os == 'Linux' + run: | + cd engine + echo "apiServerPort: 3928" > ~/.config/cortexcpp/.cortexrc + echo "huggingFaceToken: ${{ secrets.HUGGINGFACE_TOKEN_READ }}" >> ~/.config/cortexcpp/.cortexrc + echo "gitHubToken: ${{ secrets.PAT_SERVICE_ACCOUNT }}" >> ~/.config/cortexcpp/.cortexrc + # ./build/cortex + cat ~/.config/cortexcpp/.cortexrc - name: Run e2e tests if: github.event_name != 'schedule' && runner.os != 'Windows' && github.event.pull_request.draft == false @@ -414,12 +435,21 @@ jobs: make build CMAKE_EXTRA_FLAGS="${{ matrix.cmake-flags }}" BUILD_DEPS_CMAKE_EXTRA_FLAGS="${{ matrix.build-deps-cmake-flags }}" - name: Run setup config + if: runner.os != 'Linux' run: | cd engine echo "gitHubToken: ${{ secrets.GITHUB_TOKEN }}" > ~/.cortexrc # ./build/cortex cat ~/.cortexrc + - name: Run setup config + if: runner.os == 'Linux' + run: | + cd engine + echo "gitHubToken: ${{ secrets.GITHUB_TOKEN }}" > ~/.config/cortexcpp/.cortexrc + # ./build/cortex + cat ~/.config/cortexcpp/.cortexrc + - name: Run unit tests run: | cd engine @@ -428,12 +458,22 @@ jobs: GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }} - name: Run setup config + if: runner.os != 'Linux' run: | cd engine echo "apiServerPort: 3928" > ~/.cortexrc echo "gitHubToken: ${{ secrets.GITHUB_TOKEN }}" > ~/.cortexrc # ./build/cortex cat ~/.cortexrc + + - name: Run setup config + if: runner.os == 'Linux' + run: | + cd engine + echo "apiServerPort: 3928" > ~/.config/cortexcpp/.cortexrc + echo "gitHubToken: ${{ secrets.GITHUB_TOKEN }}" > ~/.config/cortexcpp/.cortexrc + # ./build/cortex + cat ~/.config/cortexcpp/.cortexrc - name: Run e2e tests if: github.event_name != 'schedule' && runner.os != 'Windows' && github.event.pull_request.draft == false diff --git a/.github/workflows/test-cortexso-model-hub.yml b/.github/workflows/test-cortexso-model-hub.yml index 6e1539420..3bf7f96ab 100644 --- a/.github/workflows/test-cortexso-model-hub.yml +++ b/.github/workflows/test-cortexso-model-hub.yml @@ -67,7 +67,7 @@ jobs: run: | cd engine ./build/cortex --version - sed -i 's/huggingFaceToken: ""/huggingFaceToken: "${{ secrets.HUGGINGFACE_TOKEN_READ }}"/' ~/.cortexrc + sed -i 's/huggingFaceToken: ""/huggingFaceToken: "${{ secrets.HUGGINGFACE_TOKEN_READ }}"/' ~/.config/cortexcpp/.cortexrc - name: Run e2e tests run: | diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 761c5bc19..a3880e2ef 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,8 +2,9 @@ # Install cortex.llamacpp engine -echo "apiServerHost: 0.0.0.0" > /root/.cortexrc -echo "enableCors: true" >> /root/.cortexrc +mkdir -p /root/.config/cortexcpp +echo "apiServerHost: 0.0.0.0" > /root/.config/cortexcpp/.cortexrc +echo "enableCors: true" >> /root/.config/cortexcpp/.cortexrc # Start the cortex server cortex start @@ -15,6 +16,6 @@ cortex engines list # Keep the container running by tailing the log files -tail -f /root/cortexcpp/logs/cortex.log & -tail -f /root/cortexcpp/logs/cortex-cli.log & +tail -f /root/.local/share/cortexcpp/logs/cortex.log & +tail -f /root/.local/share/cortexcpp/logs/cortex-cli.log & wait \ No newline at end of file diff --git a/engine/e2e-test/api/engines/test_api_get_list_engine.py b/engine/e2e-test/api/engines/test_api_get_list_engine.py index 9a1552de6..7a77057c2 100644 --- a/engine/e2e-test/api/engines/test_api_get_list_engine.py +++ b/engine/e2e-test/api/engines/test_api_get_list_engine.py @@ -24,7 +24,7 @@ def setup_and_teardown(self): def test_api_get_list_engines_successfully(self): # Data test engine= "llama-cpp" - name= "linux-amd64-avx-cuda-11-7" + name= "linux-amd64-avx" version= "v0.1.35-27.10.24" data = {"version": version, "variant": name}