-
Notifications
You must be signed in to change notification settings - Fork 59
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
Helm chart: Add default minimal pod security #133
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,17 +13,17 @@ helm dependency update chatqna | |
export HFTOKEN="insert-your-huggingface-token-here" | ||
export MODELDIR="/mnt" | ||
export MODELNAME="Intel/neural-chat-7b-v3-3" | ||
helm install chatqna chatqna --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.volume=${MODELDIR} --set llm-uservice.tgi.LLM_MODEL_ID=${MODELNAME} | ||
helm install chatqna chatqna --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.modelUseHostPath=${MODELDIR} --set llm-uservice.tgi.LLM_MODEL_ID=${MODELNAME} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can someone specify a model dir that is absolute and on the host versus in the container root filesystem through the variable MODELDIR? Do we need to check its value? Like one does for cross site scripting attacks. |
||
# To use Gaudi device | ||
# helm install chatqna chatqna --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --values chatqna/gaudi-values.yaml | ||
``` | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
| ------------------------------- | ------ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | ||
| image.repository | string | `"opea/chatqna:latest"` | | | ||
| service.port | string | `"8888"` | | | ||
| global.HUGGINGFACEHUB_API_TOKEN | string | `""` | Your own Hugging Face API token | | ||
| global.volume | string | `"/mnt"` | Cached models directory, tgi will not download if the model is cached here. The "volume" will be mounted to container as /data directory | | ||
| llm-uservice.tgi.LLM_MODEL_ID | string | `"Intel/neural-chat-7b-v3-3"` | Models id from https://huggingface.co/, or predownloaded model directory | | ||
| Key | Type | Default | Description | | ||
| ------------------------------- | ------ | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| image.repository | string | `"opea/chatqna:latest"` | | | ||
| service.port | string | `"8888"` | | | ||
| global.HUGGINGFACEHUB_API_TOKEN | string | `""` | Your own Hugging Face API token | | ||
| global.modelUseHostPath | string | `"/mnt"` | Cached models directory, tgi will not download if the model is cached here. The host path "volume" will be mounted to container as /data directory | | ||
| llm-uservice.tgi.LLM_MODEL_ID | string | `"Intel/neural-chat-7b-v3-3"` | Models id from https://huggingface.co/, or predownloaded model directory | |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,16 @@ service: | |
type: ClusterIP | ||
port: 8888 | ||
|
||
securityContext: | ||
allowPrivilegeEscalation: false | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
capabilities: | ||
drop: | ||
- ALL | ||
seccompProfile: | ||
type: RuntimeDefault | ||
|
||
# To override values in subchart llm-uservice | ||
llm-uservice: | ||
# To override values in subchart tgi | ||
|
@@ -30,11 +40,14 @@ llm-uservice: | |
resources: | ||
limits: | ||
habana.ai/gaudi: 1 | ||
|
||
global: | ||
http_proxy: | ||
https_proxy: | ||
no_proxy: | ||
HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" | ||
volume: /mnt | ||
LANGCHAIN_TRACING_V2: false | ||
LANGCHAIN_API_KEY: "insert-your-langchain-key-here" | ||
# set modelUseHostPath to host directory if you want to use hostPath volume for model storage | ||
# comment out modeluseHostPath if you want to download the model from huggingface | ||
modelUseHostPath: /mnt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could an end user accidentially or maliciously assing directory to a place where there is sensitive material like passwords? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. User should override this directory with the one contains cached models at deployment time. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If user is expected to override it, getting an error from the default is a good thing! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Agree, but quick There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PV/PVC will be tracked by another issue #128 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think current folder (.) is good enough. Why use the parent folder (..) instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to be consistent with chatqna. Because of the new helm chart dependency structure created by @yongfengdu , we need to change the dependency image too. Codegen happens to be correct with current folder(.) in this case because it lists all the dependency's default image in its parent values.yaml, which is a bit of redundant and may be changed in the future.