-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Neko Ayaka <[email protected]>
- Loading branch information
1 parent
dd1acb0
commit 466e51c
Showing
22 changed files
with
481 additions
and
413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
docs/.vitepress/theme/components/GettingStartedBlocksEn.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<template> | ||
<TitleBlockContainerGroup> | ||
<TitleBlockContainer | ||
href="/pages/en/guide/getting-started/cli" | ||
bg="zinc-50 dark:zinc-800" | ||
border="transparent solid 2 hover:zinc-200 dark:hover:zinc-800" | ||
class="[&_.title-block-container]:bg-zinc-200 [&_.title-block-container]:dark:bg-zinc-600 [&_.title-block-container]:text-zinc-900 [&_.title-block-container]:dark:text-zinc-100" | ||
> | ||
<template #title> | ||
<div flex-1 flex items-center gap-2> | ||
<div class="title-block-container" transition="all ease-in-out duration-300" p-2 rounded-lg w-10 h-10 items-center flex justify-center> | ||
<div i-icon-park-outline:bank-card-two /> | ||
</div> | ||
<span font-semibold>Deploy models through Kollama CLI</span> | ||
</div> | ||
</template> | ||
<div flex="~ col" h-full> | ||
<div> | ||
<p m="0!" pt="2" text="zinc-500">Dislike YAML?</p> | ||
<p m="0!" text="zinc-500">Faster and better UX?</p> | ||
<p m="0!" text="zinc-500">No worries, kollama here to rescue!</p> | ||
</div> | ||
<div class="title-block-body" transition="all ease-in-out duration-300" font-mono p-2 mt-2 bg="zinc-200/50 dark:zinc-700/80" rounded-lg> | ||
<p m="0!" text="zinc-400"># <span>as regular binary cli</span></p> | ||
<p m="0!">$ <span text="blue-800 dark:blue-300">kollama </span><span text="green-800 dark:green-300">deploy phi</span></p> | ||
</div> | ||
<span flex="~ 1" items-center>or</span> | ||
<div class="title-block-body" transition="all ease-in-out duration-300" font-mono p-2 mt-2 bg="zinc-200/50 dark:zinc-700/80" rounded-lg> | ||
<p m="0!" text="zinc-400"># <span>as kubectl plugin</span></p> | ||
<p m="0!">$ <span text="blue-800 dark:blue-300">kubectl </span><span text="green-800 dark:green-300">ollama deploy phi</span></p> | ||
</div> | ||
</div> | ||
</TitleBlockContainer> | ||
<TitleBlockContainer | ||
href="/pages/en/guide/getting-started/crd" | ||
bg="zinc-50 dark:zinc-800" | ||
border="transparent solid 2 hover:zinc-200 dark:hover:zinc-800" | ||
class="[&_.title-block-container]:bg-zinc-200 [&_.title-block-container]:dark:bg-zinc-600 [&_.title-block-container]:text-zinc-900 [&_.title-block-container]:dark:text-zinc-100" | ||
> | ||
<template #title> | ||
<div flex-1 flex items-center gap-2> | ||
<div class="title-block-container" transition="all ease-in-out duration-300" p-2 rounded-lg w-10 h-10 items-center flex justify-center> | ||
<div i-icon-park-outline:file-code /> | ||
</div> | ||
<span font-semibold>Deploy models through CRD</span> | ||
</div> | ||
</template> | ||
<div flex="~ col" h-full> | ||
<div> | ||
<p m="0!" pt="2" text="zinc-500">Fine-grained control over parameters?</p> | ||
<p m="0!" text="zinc-500">GitOps and CI/CD?</p> | ||
<p m="0!" text="zinc-500">CRD is simple enough with 6 lines!</p> | ||
</div> | ||
<div class="title-block-body" transition="all ease-in-out duration-300" font-mono p-2 mt-2 bg="zinc-200/50 dark:zinc-700/80" rounded-lg> | ||
<p m="0!"><span text="blue-800 dark:blue-300">apiVersion: </span><span text="green-800 dark:green-300">ollama.ayaka.io/v1</span></p> | ||
<p m="0!"><span text="blue-800 dark:blue-300">kind: </span><span text="green-800 dark:green-300">Model</span></p> | ||
<p m="0!"><span text="blue-800 dark:blue-300">metadata:</span></p> | ||
<p m="0!"><span text="blue-800 dark:blue-300"> name: </span><span text="green-800 dark:green-300">phi</span></p> | ||
<p m="0!"><span text="blue-800 dark:blue-300">spec:</span></p> | ||
<p m="0!"><span text="blue-800 dark:blue-300"> image: </span><span text="green-800 dark:green-300">phi</span></p> | ||
</div> | ||
</div> | ||
</TitleBlockContainer> | ||
</TitleBlockContainerGroup> | ||
</template> |
65 changes: 65 additions & 0 deletions
65
docs/.vitepress/theme/components/GettingStartedBlocksZhCn.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<template> | ||
<TitleBlockContainerGroup> | ||
<TitleBlockContainer | ||
href="/pages/zh-CN/guide/getting-started/cli" | ||
bg="zinc-50 dark:zinc-800" | ||
border="transparent solid 2 hover:zinc-200 dark:hover:zinc-800" | ||
class="[&_.title-block-container]:bg-zinc-200 [&_.title-block-container]:dark:bg-zinc-600 [&_.title-block-container]:text-zinc-900 [&_.title-block-container]:dark:text-zinc-100" | ||
> | ||
<template #title> | ||
<div flex-1 flex items-center gap-2> | ||
<div class="title-block-container" transition="all ease-in-out duration-300" p-2 rounded-lg w-10 h-10 items-center flex justify-center> | ||
<div i-icon-park-outline:bank-card-two /> | ||
</div> | ||
<span font-semibold>通过 Kollama CLI 部署模型</span> | ||
</div> | ||
</template> | ||
<div flex="~ col" h-full> | ||
<div> | ||
<p m="0!" pt="2" text="zinc-500">讨厌 YAML?</p> | ||
<p m="0!" text="zinc-500">更好更快的使用体验?</p> | ||
<p m="0!" text="zinc-500">没问题的,用 kollama 也可以!</p> | ||
</div> | ||
<div class="title-block-body" transition="all ease-in-out duration-300" font-mono p-2 mt-2 bg="zinc-200/50 dark:zinc-700/80" rounded-lg> | ||
<p m="0!" text="zinc-400"># <span>常规二进制</span></p> | ||
<p m="0!">$ <span text="blue-800 dark:blue-300">kollama </span><span text="green-800 dark:green-300">deploy phi</span></p> | ||
</div> | ||
<span flex="~ 1" items-center>or</span> | ||
<div class="title-block-body" transition="all ease-in-out duration-300" font-mono p-2 mt-2 bg="zinc-200/50 dark:zinc-700/80" rounded-lg> | ||
<p m="0!" text="zinc-400"># <span>作为 kubectl 插件</span></p> | ||
<p m="0!">$ <span text="blue-800 dark:blue-300">kubectl </span><span text="green-800 dark:green-300">ollama deploy phi</span></p> | ||
</div> | ||
</div> | ||
</TitleBlockContainer> | ||
<TitleBlockContainer | ||
href="/pages/zh-CN/guide/getting-started/crd" | ||
bg="zinc-50 dark:zinc-800" | ||
border="transparent solid 2 hover:zinc-200 dark:hover:zinc-800" | ||
class="[&_.title-block-container]:bg-zinc-200 [&_.title-block-container]:dark:bg-zinc-600 [&_.title-block-container]:text-zinc-900 [&_.title-block-container]:dark:text-zinc-100" | ||
> | ||
<template #title> | ||
<div flex-1 flex items-center gap-2> | ||
<div class="title-block-container" transition="all ease-in-out duration-300" p-2 rounded-lg w-10 h-10 items-center flex justify-center> | ||
<div i-icon-park-outline:file-code /> | ||
</div> | ||
<span font-semibold>通过 CRD 部署模型</span> | ||
</div> | ||
</template> | ||
<div flex="~ col" h-full> | ||
<div> | ||
<p m="0!" pt="2" text="zinc-500">对部署参数的精细控制?</p> | ||
<p m="0!" text="zinc-500">GitOps 和自动化部署?</p> | ||
<p m="0!" text="zinc-500">CRD 也超简单,只有 6 行!</p> | ||
</div> | ||
<div class="title-block-body" transition="all ease-in-out duration-300" font-mono p-2 mt-2 bg="zinc-200/50 dark:zinc-700/80" rounded-lg> | ||
<p m="0!"><span text="blue-800 dark:blue-300">apiVersion: </span><span text="green-800 dark:green-300">ollama.ayaka.io/v1</span></p> | ||
<p m="0!"><span text="blue-800 dark:blue-300">kind: </span><span text="green-800 dark:green-300">Model</span></p> | ||
<p m="0!"><span text="blue-800 dark:blue-300">metadata:</span></p> | ||
<p m="0!"><span text="blue-800 dark:blue-300"> name: </span><span text="green-800 dark:green-300">phi</span></p> | ||
<p m="0!"><span text="blue-800 dark:blue-300">spec:</span></p> | ||
<p m="0!"><span text="blue-800 dark:blue-300"> image: </span><span text="green-800 dark:green-300">phi</span></p> | ||
</div> | ||
</div> | ||
</TitleBlockContainer> | ||
</TitleBlockContainerGroup> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script setup lang="ts"> | ||
const props = defineProps<{ | ||
title?: string | ||
href?: string | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<a w-full p-4 rounded-lg transition="all ease-in-out duration-300" cursor-pointer flex="~ col" :href="props.href" decoration="none!"> | ||
<div flex="1"> | ||
<div flex="~" items-center> | ||
<div v-if="props.title" text-lg font-semibold flex-1> | ||
<span>{{ props.title }}</span> | ||
</div> | ||
<template v-else> | ||
<slot name="title" /> | ||
</template> | ||
</div> | ||
</div> | ||
<slot /> | ||
</a> | ||
</template> |
5 changes: 5 additions & 0 deletions
5
docs/.vitepress/theme/components/TitleBlockContainerGroup.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div flex="~ row <md:col" w-full my-4 gap-4> | ||
<slot /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Deploy through `kollama` CLI | ||
|
||
We have a CLI called `kollama` here to simplify the deployment process. It is a simple way to deploy Ollama models to your Kubernetes cluster. | ||
|
||
## Getting Started | ||
|
||
1. Install the CLI: | ||
|
||
```shell | ||
go install github.com/nekomeowww/ollama-operator/cmd/kollama@latest | ||
``` | ||
|
||
2. Deploy a model: | ||
|
||
```shell | ||
kollama deploy phi --expose --node-port 30001 | ||
``` | ||
|
||
That's it. | ||
|
||
3. Interact with the model: | ||
|
||
```shell | ||
OLLAMA_HOST=<Node ip>:30001 ollama run phi | ||
``` | ||
|
||
or use the OpenAI API compatible endpoint: | ||
|
||
```shell | ||
curl http://<Node ip>:30001/v1/chat/completions -H "Content-Type: application/json" -d '{ | ||
"model": "phi", | ||
"messages": [ | ||
{ | ||
"role": "user", | ||
"content": "Hello!" | ||
} | ||
] | ||
}' | ||
``` |
Oops, something went wrong.