diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 847727f2..b7b7322c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -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. diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index edcc7b57..f7fce574 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -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 @@ -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 diff --git a/.github/workflows/test-docker-args.yaml b/.github/workflows/test-docker-args.yaml index 65fce765..031fa593 100644 --- a/.github/workflows/test-docker-args.yaml +++ b/.github/workflows/test-docker-args.yaml @@ -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 diff --git a/.github/workflows/test-docker.yaml b/.github/workflows/test-docker.yaml index 2896203f..a397643a 100644 --- a/.github/workflows/test-docker.yaml +++ b/.github/workflows/test-docker.yaml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/test-helm.yaml b/.github/workflows/test-helm.yaml index 0993fc98..5a8632c6 100644 --- a/.github/workflows/test-helm.yaml +++ b/.github/workflows/test-helm.yaml @@ -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 diff --git a/.github/workflows/test-kubernetes.yaml b/.github/workflows/test-kubernetes.yaml index 3c97dbc0..38b59315 100644 --- a/.github/workflows/test-kubernetes.yaml +++ b/.github/workflows/test-kubernetes.yaml @@ -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 diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index 95e76dc5..e6c4972e 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -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 @@ -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 diff --git a/.golangci.yaml b/.golangci.yaml index 6e19867d..b58f4c8c 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,6 +1,6 @@ run: timeout: 5m - go: "1.22" + go: "1.23" linters-settings: lll: @@ -13,7 +13,7 @@ linters: enable: - errcheck - errorlint - - exportloopref + - copyloopvar - forcetypeassert - gci - gocritic diff --git a/go.mod b/go.mod index 6f727d93..fe5d7b69 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/pkg/aikit2llb/inference/convert.go b/pkg/aikit2llb/inference/convert.go index 8f1070b6..a5c3dd1d 100644 --- a/pkg/aikit2llb/inference/convert.go +++ b/pkg/aikit2llb/inference/convert.go @@ -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" ) diff --git a/pkg/aikit2llb/inference/exllama.go b/pkg/aikit2llb/inference/exllama.go index 1a0532b2..852bf365 100644 --- a/pkg/aikit2llb/inference/exllama.go +++ b/pkg/aikit2llb/inference/exllama.go @@ -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}) diff --git a/pkg/aikit2llb/inference/mamba.go b/pkg/aikit2llb/inference/mamba.go index 6c2adae9..3084d10a 100644 --- a/pkg/aikit2llb/inference/mamba.go +++ b/pkg/aikit2llb/inference/mamba.go @@ -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})