Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update localai to v2.20.1 #369

Merged
merged 11 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: "1.22"
go-version: "1.23"
check-latest: true

# Initializes the CodeQL tools for scanning.
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:

permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -36,10 +40,10 @@ jobs:

- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: "1.22"
go-version: "1.23"
check-latest: true

- name: lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
version: v1.59.0
version: v1.60.3
4 changes: 4 additions & 0 deletions .github/workflows/test-docker-args.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:

permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:

permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -67,6 +71,7 @@ jobs:
dl-cdn.alpinelinux.org:443
*.ubuntu.com:80
ghcr.io:443
sum.golang.org:443

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

Expand Down Expand Up @@ -198,6 +203,7 @@ jobs:
registry.ollama.ai:443
*.cloudflarestorage.com:443
ghcr.io:443
sum.golang.org:443

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:

permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:

permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:

permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -36,7 +40,7 @@ jobs:

- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: "1.22"
go-version: "1.23"
check-latest: true

- name: go mod tidy
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
run:
timeout: 5m
go: "1.22"
go: "1.23"

linters-settings:
lll:
Expand All @@ -13,7 +13,7 @@ linters:
enable:
- errcheck
- errorlint
- exportloopref
- copyloopvar
- forcetypeassert
- gci
- gocritic
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/sozercan/aikit

go 1.21.0

toolchain go1.22.5
toolchain go1.23.0

require (
github.com/containerd/platforms v0.2.1
Expand Down
2 changes: 1 addition & 1 deletion pkg/aikit2llb/inference/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
const (
distrolessBase = "ghcr.io/sozercan/base:latest"
localAIRepo = "https://github.com/mudler/LocalAI"
localAIVersion = "v2.19.4"
localAIVersion = "v2.20.1"
cudaVersion = "12-5"
)

Expand Down
4 changes: 3 additions & 1 deletion pkg/aikit2llb/inference/exllama.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ func installExllama(c *config.InferenceConfig, s llb.State, merge llb.State) llb

s = cloneLocalAI(s)

s = s.Run(utils.Bashf("export BUILD_TYPE=cublas && cd /tmp/localai/backend/python/%[1]s && make %[1]s", backend)).Root()
// TODO: remove sed for grpcio with localai v2.20.2+
// https://github.com/mudler/LocalAI/pull/3428/files
s = s.Run(utils.Bashf("export BUILD_TYPE=cublas && export CUDA_MAJOR_VERSION=12 && cd /tmp/localai/backend/python/%[1]s && sed -i 's/grpcio==1.66.0/grpcio==1.66.1/g' requirements.txt && make %[1]s", backend)).Root()

diff := llb.Diff(savedState, s)
return llb.Merge([]llb.State{merge, diff})
Expand Down
2 changes: 1 addition & 1 deletion pkg/aikit2llb/inference/mamba.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func installMamba(s llb.State, merge llb.State) llb.State {

s = cloneLocalAI(s)

s = s.Run(utils.Bashf("export BUILD_TYPE=cublas && cd /tmp/localai/backend/python/%[1]s && make %[1]s", utils.BackendMamba)).Root()
s = s.Run(utils.Bashf("export BUILD_TYPE=cublas && export CUDA_MAJOR_VERSION=12 && cd /tmp/localai/backend/python/%[1]s && make %[1]s", utils.BackendMamba)).Root()

diff := llb.Diff(savedState, s)
return llb.Merge([]llb.State{merge, diff})
Expand Down
Loading