Skip to main content
Version: v2.6.0

Allocate device core and memory resource

Allocate device core and memory to container

To allocate a certain part of device core resource, you need only to assign the iluvatar.ai/vcuda-memory and iluvatar.ai/vcuda-core along with the number of cambricon MLUs you requested in the container using iluvatar.ai/vgpu

apiVersion: v1
kind: Pod
metadata:
name: poddemo
spec:
restartPolicy: Never
containers:
- name: poddemo
image: harbor.4pd.io/vgpu/corex_transformers@sha256:36a01ec452e6ee63c7aa08bfa1fa16d469ad19cc1e6000cf120ada83e4ceec1e
command:
- bash
args:
- -c
- |
set -ex
echo "export LD_LIBRARY_PATH=/usr/local/corex/lib64:$LD_LIBRARY_PATH">> /root/.bashrc
cp -f /usr/local/iluvatar/lib64/libcuda.* /usr/local/corex/lib64/
cp -f /usr/local/iluvatar/lib64/libixml.* /usr/local/corex/lib64/
source /root/.bashrc
sleep 360000
resources:
requests:
iluvatar.ai/vgpu: 2
limits:
iluvatar.ai/vgpu: 2