Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
linfengjun 0c44a5ba2e | 2 years ago | |
---|---|---|
.. | ||
examples | 2 years ago | |
pkg/cndev | 2 years ago | |
test | 2 years ago | |
.gitignore | 2 years ago | |
.gitlab-ci.yml | 2 years ago | |
CHANGELOG.md | 2 years ago | |
Dockerfile | 2 years ago | |
Makefile | 2 years ago | |
README.md | 2 years ago | |
build_image.sh | 2 years ago | |
cambricon.go | 2 years ago | |
cambricon_test.go | 2 years ago | |
create_release_package.sh | 2 years ago | |
go.mod | 2 years ago | |
go.sum | 2 years ago | |
main.go | 2 years ago | |
server.go | 2 years ago | |
server_test.go | 2 years ago |
无官方docker镜像,原项目地址https://github.com/Cambricon/cambricon-k8s-device-plugin,修改了编译脚本
The Cambricon device plugin for Kubernetes is a Daemonset which allows you to automatically:
This repository contains Cambricon's official implementation of the Kubernetes device plugin.
The prerequisites for running the Cambricon device plugin:
It assumes that the Cambricon drivers and neuware are installed on your MLU Nodes.
git clone https://github.com/Cambricon/cambricon-k8s-device-plugin.git
cd cambricon-k8s-device-plugin/device-plugin
Set the following environment variables if you need.
env | description |
---|---|
APT_PROXY | apt proxy server |
GOPROXY | golang proxy server |
ARCH | target platform architecture, amd64 or arm64, amd64 by default |
LIBCNDEV | absolute path of the libcndev.so binary, neuware installation path by default |
If you want to cross build, make sure docker version >= 19.03.
For amd64:
./build_image.sh
For arm64:
export ARCH=arm64
./build_image.sh
Please make sure Cambricon neuware is installed in your compiling environment.
It uses libcndev.so binary on your compiling machine and generates docker image in folder ./image
.
Push the docker image to the docker repo of your cluster or load the docker image on all your MLU nodes by:
docker load -i image/cambricon-k8s-device-plugin-amd64.tar
Enable MLU support in your cluster by deploying the daemonset in examples folder:
Set the mode arg in the yaml file to change mode
args:
- -mode
- default # switch mode here
env:
# change this if env-share mode or sriov mode is enabled.
- name: VIRTUALIZATION_NUM
value: "0"
supported features:
VIRTUALIZATION_NUM
as number of VFs on host.VIRTUALIZATION_NUM
as maximum number of containers one MLU can be allocated into.kubectl create -f cambricon-device-plugin-daemonset.yml
(Optional) If you do not want the daemonset way of deployment, edit the static pod template in examples folder and
put the file into your configured static pod folder (/etc/kubernetes/manifests
by default).
Cambricon MLUs can now be consumed via container level resource requirements using the resource name cambricon.com/mlu
:
apiVersion: v1
kind: Pod
metadata:
name: pod1
spec:
restartPolicy: OnFailure
containers:
- image: ubuntu:16.04
name: pod1-ctr
command: ["sleep"]
args: ["100000"]
resources:
limits:
cambricon.com/mlu: 1
面向多计算场景的一站式融合计算平台
CSS Go SVG Vue Markdown 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》