百度云CCE集群(K8S)无法pip install paddle-serving-server
Created by: wangjiawei04
Server端Yaml
以下文件名为lac_serving.yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: paddleserving
labels:
app: paddleserving
spec:
replicas: 1
template:
metadata:
name: paddleserving
labels:
app: paddleserving
spec:
containers:
- name: paddleserving
image: hub.baidubce.com/paddlepaddle/serving:0.2.0
imagePullPolicy: Always
workingDir: /
command: ['/bin/bash', '-c']
args: ['pip install paddle-serving-server
-i https://pypi.tuna.tsinghua.edu.cn/simple && wget --no-check-certificate https://paddle-serving.bj.bcebos.com/lac/lac_model_jieba_web.tar.gz && tar -xzf lac_model_jieba_web.tar.gz && python lac_web_service.py jieba_server_model/ lac_workdir 9292']
ports:
- containerPort: 9292
name: serving
---
apiVersion: v1
kind: Service
metadata:
name: paddleserving
spec:
ports:
- name: paddleserving
port: 9292
targetPort: 9292
selector:
app: paddleserving
执行 kubectl apply -f lac_serving.yaml
在启动容器之后,发现pip install 操作会TIMEOUT。