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

fix: correct inference module pod spec generate #92

Merged
merged 3 commits into from
Sep 4, 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 modules/inference/example/dev/example_workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
modules:
inference:
path: oci://ghcr.io/kusionstack/inference
version: 0.1.0-beta.1
version: 0.1.0-beta.2
configs:
default: {}
2 changes: 1 addition & 1 deletion modules/inference/example/dev/kcl.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "example"

[dependencies]
inference = { oci = "oci://ghcr.io/kusionstack/inference", tag = "0.1.0-beta.1" }
inference = { oci = "oci://ghcr.io/kusionstack/inference", tag = "0.1.0-beta.2" }
service = {oci = "oci://ghcr.io/kusionstack/service", tag = "0.1.0" }
kam = { git = "https://github.com/KusionStack/kam.git", tag = "0.2.0" }

Expand Down
2 changes: 1 addition & 1 deletion modules/inference/kcl.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[package]
name = "inference"
version = "0.1.0-beta.1"
version = "0.1.0-beta.2"
2 changes: 1 addition & 1 deletion modules/inference/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TEST?=$$(go list ./... | grep -v 'vendor')
###### chang variables below according to your own modules ###
NAMESPACE=kusionstack
NAME=inference
VERSION=0.1.0-beta.1
VERSION=0.1.0-beta.2
BINARY=../bin/kusion-module-${NAME}_${VERSION}

LOCAL_ARCH := $(shell uname -m)
Expand Down
4 changes: 2 additions & 2 deletions modules/inference/src/inference_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ func (infer *Inference) generatePodSpec(_ *module.GeneratorRequest) (v1.PodSpec,
var mountPath string
var modelPullCmd []string
var containerPort int32
switch infer.Framework {
case "ollama":
switch strings.ToLower(infer.Framework) {
case OllamaType:
mountPath = "/root/.ollama"

var builder strings.Builder
Expand Down
Loading