-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07ff0ca
commit f232984
Showing
7 changed files
with
146 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v2 | ||
name: llama-factory | ||
version: 0.1.1 | ||
appVersion: 0.1.0 | ||
description: llama-factory | ||
type: application | ||
|
||
keywords: | ||
- llama-factory | ||
- model tune | ||
sources: | ||
- https://github.com/huangqg/LLaMA-Factory | ||
maintainers: | ||
- name: huangqg | ||
url: https://github.com/huangqg |
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 @@ | ||
# llama-factory |
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,43 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: llama-factory | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: llama-factory | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: llama-factory | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: llama-factory | ||
spec: | ||
containers: | ||
- image: {{ .Values.image }} | ||
imagePullPolicy: {{ .Values.imagePullPolicy }} | ||
name: llama-factory | ||
ports: | ||
- containerPort: 7860 | ||
protocol: TCP | ||
resources: {{ toYaml .Values.resources | nindent 10 }} | ||
volumeMounts: | ||
- name: model-volume | ||
mountPath: /root/.cache/huggingface | ||
- name: data-volume | ||
mountPath: /app/data | ||
- name: output-volume | ||
mountPath: /app/output | ||
volumes: | ||
- name: model-volume | ||
hostPath: | ||
path: {{ .Values.volume.model }} | ||
- name: data-volume | ||
hostPath: | ||
path: {{ .Values.volume.data }} | ||
- name: output-volume | ||
hostPath: | ||
path: {{ .Values.volume.output }} | ||
terminationGracePeriodSeconds: 30 |
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,43 @@ | ||
{{- if .Values.ingress.enable }} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
annotations: | ||
description: llama-factory-ingress | ||
displayName: llama-factory-ingress | ||
httpSend: / | ||
ingress-lb: {{ .Values.ingress.ingressClassName }} | ||
kubernetes.io/ingress.class: {{ .Values.ingress.ingressClassName }} | ||
nginx.ingress.kubernetes.io/configuration-snippet: | | ||
proxy_cache static-cache; | ||
proxy_cache_valid 404 10m; | ||
proxy_cache_use_stale error timeout updating http_404 http_500 http_502 http_503 http_504; | ||
proxy_cache_bypass $http_x_purge; | ||
add_header X-Cache-Status $upstream_cache_status; # check X-Cache-Status to see if it's HIT | ||
rewrite ^/(llama-factory-apis)(/|$)(.*)$ /$3 break; | ||
nginx.ingress.kubernetes.io/enable-access-log: "false" | ||
nginx.ingress.kubernetes.io/enable-rewrite-log: "false" | ||
nginx.ingress.kubernetes.io/load-balance: round_robin | ||
nginx.ingress.kubernetes.io/proxy-body-size: "" | ||
nginx.ingress.kubernetes.io/proxy-buffering: "on" | ||
nginx.ingress.kubernetes.io/proxy-connect-timeout: "60" | ||
nginx.ingress.kubernetes.io/server-alias: "" | ||
nginx.ingress.kubernetes.io/ssl-redirect: "true" | ||
nginx.ingress.kubernetes.io/upstream-vhost: $host | ||
labels: | ||
ingress-lb: {{ .Values.ingress.ingressClassName }} | ||
name: llama-factory | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
rules: | ||
- host: portal.{{ .Values.ingress.ingressDomain }} | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: llama-factory | ||
port: | ||
number: 7860 | ||
path: / | ||
pathType: ImplementationSpecific | ||
{{- end }} |
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,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: llama-factory | ||
name: llama-factory | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
ports: | ||
- name: http | ||
port: 7860 | ||
protocol: TCP | ||
targetPort: 7860 | ||
selector: | ||
app: llama-factory | ||
sessionAffinity: None | ||
type: ClusterIP |
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,23 @@ | ||
image: kubeagi/llama-factory:v0.6.1 | ||
imagePullPolicy: IfNotPresent | ||
resources: | ||
limits: | ||
cpu: "4" | ||
memory: 12Gi | ||
nvidia.com/gpu: "1" | ||
requests: | ||
cpu: "1" | ||
memory: 1Gi | ||
nvidia.com/gpu: "1" | ||
|
||
volume: | ||
model: /path/to/model/or/cache | ||
data: /path/to/data | ||
output: /path/to/output | ||
|
||
# ingress configurations for component | ||
ingress: | ||
# set enable to `true` to enable ingress | ||
enable: true | ||
ingressClassName: portal-ingress | ||
ingressDomain: your.domain.nip.io |
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