8000 Prepare for v0.0.4 by kerthcet · Pull Request #101 · InftyAI/llmaz · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Prepare for v0.0.4 #101

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

Merged
merged 1 commit into from
Aug 19, 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
4 changes: 2 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LWS_VERSION=v0.3.0
kubectl apply --server-side -f https://github.com/kubernetes-sigs/lws/releases/download/$LWS_VERSION/manifests.yaml

# llmaz runs in llmaz-system
LLMAZ_VERSION=v0.0.3
LLMAZ_VERSION=v0.0.4
kubectl apply --server-side -f https://github.com/inftyai/llmaz/releases/download/$LLMAZ_VERSION/manifests.yaml
```

Expand All @@ -24,7 +24,7 @@ kubectl apply --server-side -f https://github.com/inftyai/llmaz/releases/downloa
LWS_VERSION=v0.3.0
kubectl delete -f https://github.com/kubernetes-sigs/lws/releases/download/$LWS_VERSION/manifests.yaml

LLMAZ_VERSION=v0.0.3
LLMAZ_VERSION=v0.0.4
kubectl delete -f https://github.com/inftyai/llmaz/releases/download/$LLMAZ_VERSION/manifests.yaml
```

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller_helper/model_source/modelhub.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (p *ModelHubProvider) InjectModelLoader(template *corev1.PodTemplateSpec) {
Name: MODEL_VOLUME_NAME,
VolumeSource: corev1.VolumeSource{
HostPath: &corev1.HostPathVolumeSource{
Path: HOST_MODEL_PATH,
Path: HOST_CLUSTER_MODEL_PATH,
Type: &hostType,
},
},
Expand Down
4 changes: 3 additions & 1 deletion pkg/controller_helper/model_source/modelsource.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ import (
const (
// model path
CONTAINER_MODEL_PATH = "/workspace/models/"
HOST_MODEL_PATH = "/cache/models/"
HOST_MODEL_BASE_PATH = "/mnt/models/"
// TODO: we may need /mnt/models/namespace1/ path in the future for isolations.
HOST_CLUSTER_MODEL_PATH = HOST_MODEL_BASE_PATH + "cluster/"

// container & volume configs
DEFAULT_BACKEND_PORT = 8080
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller_helper/model_source/uri.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (p *URIProvider) InjectModelLoader(template *corev1.PodTemplateSpec) {
Name: MODEL_VOLUME_NAME,
VolumeSource: corev1.VolumeSource{
HostPath: &corev1.HostPathVolumeSource{
Path: HOST_MODEL_PATH,
Path: HOST_CLUSTER_MODEL_PATH,
Type: &hostType,
},
},
Expand Down
2 changes: 2 additions & 0 deletions pkg/webhook/openmodel_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func (w *OpenModelWebhook) ValidateDelete(ctx context.Context, obj runtime.Objec
return nil, nil
}

// TODO: once namespaced models enabled, we should validate that only such volume path
// /mnt/models/<model-namespace>/ is allowed.
func (w *OpenModelWebhook) generateValidate(obj runtime.Object) field.ErrorList {
model := obj.(*coreapi.OpenModel)
dataSourcePath := field.NewPath("spec", "dataSource")
Expand Down
2 changes: 1 addition & 1 deletion test/util/validation/validate_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func ValidateModelLoader(model *coreapi.OpenModel, workload *lws.LeaderWorkerSet

for _, v := range service.Spec.WorkloadTemplate.LeaderWorkerTemplate.WorkerTemplate.Spec.Volumes {
if v.Name == modelSource.MODEL_VOLUME_NAME {
if v.HostPath == nil || v.HostPath.Path != modelSource.HOST_MODEL_PATH || *v.HostPath.Type != corev1.HostPathDirectoryOrCreate {
if v.HostPath == nil || v.HostPath.Path != modelSource.HOST_CLUSTER_MODEL_PATH || *v.HostPath.Type != corev1.HostPathDirectoryOrCreate {
return errors.New("when using modelHub modelSource, the hostPath shouldn't be nil")
}
}
Expand Down
Loading
0