Skip to main content

Compute Resource Exchange

You can sublease your compute resource by OpenCSG

1.0 Contact Us

contact@opencsg.com

2.0 Config

2.1 Install docker

curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
apt-get install docker-ce docker-ce-cli containerd.io

2.2 Install nvidia-container-toolkit

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
&& curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
&& curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list

sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit

2.3 Install nvidia-container-toolkit

2.4 Enable TLS for docker client, connect contact@opencsg.com to get certificate

cert localtion: packages/server/docker_client/cert
enable TLS for docker : /lib/systemd/system/docker.service, add following parameters:
-H tcp://0.0.0.0:31375 --tlsverify --tlscacert /root/cert/ca.pem --tlscert /root/cert/cert.pem --tlskey /root/cert/key.pem

systemctl daemon-reload
systemctl restart docker

2.5 Set file system quota

mkfs.xfs /dev/xxx
mount -o pquota /dev/xxx /data

2.6 Config docker

vim /etc/docker/daemon.json and add following:

{
"runtimes": {
"nvidia": {
"args": [],
"path": "nvidia-container-runtime"
}
},
"storage-opts": [
"overlay2.size=40G"
],
"data-root": "/data/docker"
}

2.7 Restart docker

systemctl restart docker