File tree Expand file tree Collapse file tree
zh-CN/guide/getting-started Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,11 +80,11 @@ lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
8080
8181.PHONY : build
8282build : manifests generate fmt vet # # Build manager binary.
83- go build -o bin/manager cmd/main.go
83+ go build -o bin/manager cmd/ollama-operator/ main.go
8484
8585.PHONY : run
8686run : manifests generate fmt vet # # Run a controller from your host.
87- go run ./cmd/main.go
87+ go run ./cmd/ollama-operator/ main.go
8888
8989# If you wish to build the manager image targeting other platforms you can use the --platform flag.
9090# (i.e. docker build --platform linux/arm64). However, you must enable docker buildKit for it.
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ go install github.com/nekomeowww/ollama-operator/cmd/kollama@latest
15152 . Deploy a model:
1616
1717``` shell
18- kollama deploy phi --expose --node-port 30001
18+ kollama deploy phi --expose --node-port 30101
1919```
2020
2121> For more information about the ` deploy ` command, please refer to [ ` kollama deploy ` ] ( /pages/en/references/cli/commands/deploy ) .
@@ -25,13 +25,13 @@ That's it.
25253 . Interact with the model:
2626
2727``` shell
28- OLLAMA_HOST=< Node ip> :30001 ollama run phi
28+ OLLAMA_HOST=< Node ip> :30101 ollama run phi
2929```
3030
3131or use the OpenAI API compatible endpoint:
3232
3333``` shell
34- curl http://< Node ip> :30001 /v1/chat/completions -H " Content-Type: application/json" -d ' {
34+ curl http://< Node ip> :30101 /v1/chat/completions -H " Content-Type: application/json" -d ' {
3535 "model": "phi",
3636 "messages": [
3737 {
Original file line number Diff line number Diff line change @@ -15,21 +15,21 @@ go install github.com/nekomeowww/ollama-operator/cmd/kollama@latest
15152 . 部署 Ollama 模型 CRD 到 Kubernetes 集群:
1616
1717``` shell
18- kollama deploy phi --expose --node-port 30001
18+ kollama deploy phi --expose --node-port 30101
1919```
2020
2121> 有关 ` deploy ` 命令的更多信息,请参阅 [ ` kollama deploy ` ] ( /pages/zh-CN/references/cli/commands/deploy ) 。
2222
23233 . 开始与模型进行交互吧:
2424
2525``` shell
26- OLLAMA_HOST=< 节点 IP> :30001 ollama run phi
26+ OLLAMA_HOST=< 节点 IP> :30101 ollama run phi
2727```
2828
2929或者使用 ` curl ` 连接到与 OpenAI API 兼容的接口:
3030
3131``` shell
32- curl http://< 节点 IP> :30001 /v1/chat/completions -H " Content-Type: application/json" -d ' {
32+ curl http://< 节点 IP> :30101 /v1/chat/completions -H " Content-Type: application/json" -d ' {
3333 "model": "phi",
3434 "messages": [
3535 {
Original file line number Diff line number Diff line change @@ -86,9 +86,7 @@ func EnsureDeploymentCreated(
8686 Spec : appsv1.DeploymentSpec {
8787 Replicas : lo .Ternary (replicas == nil , lo .ToPtr (int32 (1 )), replicas ),
8888 Selector : & metav1.LabelSelector {
89- MatchLabels : map [string ]string {
90- "app" : ModelAppName (name ),
91- },
89+ MatchLabels : ModelLabels (ModelAppName (name ), name , false ),
9290 },
9391 Template : corev1.PodTemplateSpec {
9492 ObjectMeta : metav1.ObjectMeta {
You can’t perform that action at this time.
0 commit comments