Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
huolongshe e2dc0252fd | 1 year ago | |
---|---|---|
app | 1 year ago | |
webapp | 1 year ago | |
.gitignore | 1 year ago | |
Dockerfile | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago | |
application.yml | 1 year ago | |
build-docker.sh | 1 year ago | |
pip-install-reqs.sh | 1 year ago | |
requirements.txt | 1 year ago | |
start.py | 1 year ago |
本程序为 CubeAI智立方 系列软件中的一个独立组件,用于在本地将 《CubeAI模型示范库》 中的AI模型推理服务程序打包为Docker镜像并部署运行。
本程序以Docker容器方式部署运行,使用方法和步骤如下:
启动 cubeai-model-deployer 容器服务:
docker run -p 3310:80 --privileged=true -v /usr/bin/docker:/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -v /etc/docker:/etc/docker cubenet/cubeai-model-deployer:0.0.1
在浏览器中打开如下页面:
http://localhost:3310
在打开的浏览器页面的URL输入栏中,填入欲打包Docker镜像的AI模型推理服务程序的git代码仓库URL,然后点击“确定”按钮开始构建模型Docker镜像。例如:
https://openi.pcl.ac.cn/cubeai-model-zoo/openvino-face-detector.git
构建成功后,可根据提示信息将刚刚打包生成的模型推理服务程序Docker镜像部署至本地Docker容器或k8s环境运行。
本地部署
在本地terminal窗口中执行如下命令来查看刚刚打包生成的Docker镜像,并在Docker容器中运行该服务:
docker images
docker run -p 3330:80 <模型Docker镜像ID或镜像名>
或(如果本机系统中存在NVIDIA GPU卡):
docker run -p 3330:80 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -e LD_LIBRARY_PATH=/usr/local/cuda/lib64 -v /usr/local/cuda:/usr/local/cuda <模型Docker镜像ID或镜像名>
部署至Kubernetes
向Kubernetes云环境部署时,需要提供Kubernetes端点URL和Kubernetes Token。
如果部署至本机Minikube,可通过执行以下命令来获取Kubernetes URL和Kubernetes Token的值:
# Kubernetes URL, 使用以下命令的返回值
echo 'https://'$(kubectl get ep kubernetes --no-headers|awk '{print $2}')
# Kubernetes Token, 使用以下命令的返回值
kubectl -nkube-system get $(kubectl get secret -nkube-system -oname|grep remote-admin-token) -ojsonpath={.data.token}|base64 -d
CubeAI模型独立部署工具
TypeScript Python HTML Shell Dockerfile other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》