Recently, a new AI project was launched, which mainly provides AI online experiments for universities. The project also purchased a GPU server, but there is only one Nvidia Tesla T4 card, which needs to support multiple students to do experiments online at the same time. The online experiment system is currently running on Kubernetes, so it is necessary to consider GPU sharing in the k8s environment. Alibaba Cloud GPU card
Using Alibaba Cloud's open source solution to enable multiple people to use a single GPU
Golang pointer detailed explanation
What is a pointer? In Go, a pointer is a variable that stores the memory address of another variable. Therefore, a pointer variable points to the memory address of another variable, not the variable itself. When declaring a pointer variable, you need to add * before the variable name to indicate that it is a pointer variable, for example: Copy 1 var p *int This means that a pointer named
Kind builds a lightweight kubernetes cluster
I was reviewing Golang recently and wrote a web application. After running it locally, I wanted to test it in a k8s cluster. Due to the machine configuration, it was still a bit difficult to build a complete k8s cluster. I remember that a friend said that k8s can also be run in docker, so I tried it. Today’s protagonist is kind, so what is kind? What can kind be
Jenkins Agent integrates docker and kubectl tools
When we build Jenkins, the official jenkins-agent does not have the tools we use, such as helm, kubectl, curl, argocd, etc., so we need to integrate them. Note that the official image names have changed: jenkins/agent image, originally named jenkins/slave, renamed to jenkins/agent from 4.3-2 jenkins/inbound-agent image: originally named jenkins/jnlp-slave, renamed to jenkins/inbound-agent from 4.3-2 Dockerfile Copy 1 2 3 4 5 6 7 8 9 10 FROM jenkins/inbound-agent:4.11-1-alpine-jdk11 USER
Jenkins Workspace and Maven cache local persistent storage
Create local storage Since this is a test cluster, we can directly use local volume storage here; Since the user running in the jenkins server here is jenkins, and the uid of jenkins is 1000, we need to grant /opt/jenkins_agent/ and /opt/jenkins_maven/ permissions to jenkins in advance on node1 Copy 1 2 chown 1000.1000 -R /opt/jenkins_agent -R chown 1000.1000 -R /opt/jenkins_maven/ -R Local storage: agent-pv-pvc.yaml Copy 1 2 3 4
Golang basic programming
1. Basic knowledge 1. Basic data types Value type: Copy 1 2 3 4 5 6 7 8 9 10 11 12 bool (length 1Byte or 1 byte) byte (1 byte, uint8 alias) rune (4 bytes, int32 alias, -231~231) int (32 or 64, length 4 or 8 bytes) int8 (length 1 byte), int16 (length 2 bytes), int32 (length 4 bytes), int64 (length 8 bytes) uint (32 or 64, length 4
Deploy Jenkins in kubernetes environment
1. Install and deploy Jenkins 1. Manual installation Manual installation is very simple. Just prepare the yaml configuration in advance. The content of all CICD resources jenkins-install.yaml is as follows: Copy 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 apiVersion: v1 kind: PersistentVolume metadata: name: jenkins-pv spec: storageClassName: local
Delve version is too low to be compatible with Goland
Problem When debugging code in Goland recently, the following error is always reported: Copy 1 WARNING: undefined behavior - version of Delve is too old for Go version 1.19.3 (maximum supported version 1.18) Solution The problem probably means that the Delve version is too low and cannot meet the current Golang version Update delve. Since I use brew to install it here, the default official website installation document does not