Skip to content

Commit 484753f

Browse files
authored
Add model zoo to playground (#2770)
* Add model zoo to playground * update indent
1 parent e9351cc commit 484753f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

doc/run/k8s/install-sqlflow.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,33 @@ spec:
6464
- /work/mysql-inited
6565
initialDelaySeconds: 5
6666
periodSeconds: 5
67+
- name: model-zoo
68+
image: sqlflow/sqlflow:model_zoo
69+
imagePullPolicy: IfNotPresent
70+
ports:
71+
- containerPort: 50055
72+
protocol: TCP
73+
env:
74+
- name: MYSQL_ADDR
75+
value: 127.0.0.1:3306
76+
volumeMounts:
77+
# bind to host's docker.sock to build image
78+
- mountPath: /var/run/docker.sock
79+
name: docker-socket-volume
80+
securityContext:
81+
privileged: true
82+
command: [ "/bin/bash", "-c" ]
83+
args:
84+
- |
85+
while ! nc -z -w 1 ${MYSQL_ADDR/:/ }; do
86+
sleep 3
87+
echo "Waiting for mysql..."
88+
done
89+
echo "Starting SQLFlow Model Zoo server ..."
90+
modelzooserver --mysql-addr="mysql://root:root@tcp(${MYSQL_ADDR})/"
91+
volumes:
92+
- name: docker-socket-volume
93+
hostPath:
94+
path: /var/run/docker.sock
95+
type: File
96+

0 commit comments

Comments
 (0)