GitHub加速
加速下载:git clone https://github.com.cnpmjs.org/microsoft/onnxruntime.git
- Mac OS X
/etc/hosts
- Linux
/etc/hosts
加速下载:git clone https://github.com.cnpmjs.org/microsoft/onnxruntime.git
/etc/hosts
/etc/hosts
def touch(path):
with open(path, 'a'):
os.utime(path, None)
OS X需要root特权
os.mknod(filename)
>>> os.makedirs('dirs/sub_dir')
>>> os.listdir('/home/python')
['app', 'config', 'main.py', 'test']
>>> shutil.rmtree('/home/python')
在 Ubuntu20.04 系统上使用4张GPU卡基于容器训练模型。
$ docker run --ipc=host --runtime=nvidia -it --name project_name-yolov5 \
-v project_dir:/usr/src/app/project ultralytics/yolov5:latest
$ sed -i 's/nc: 80/nc: 2/g' project/models/yolov5?.yaml
$ head -n 2 project/models/yolov5?.yaml
==> project/models/yolov5l.yaml <==
# parameters
nc: 2 # number of classes
==> project/models/yolov5m.yaml <==
# parameters
nc: 2 # number of classes
==> project/models/yolov5s.yaml <==
# parameters
nc: 2 # number of classes
==> project/models/yolov5x.yaml <==
# parameters
nc: 2 # number of classes
在一台新安装的 Ubuntu20.04 系统上安装 NVIDIA GPU 驱动。
$ sudo update-initramfs -u
$ sudo reboot
$ lsmod | grep nouveau

$ wget https://cn.download.nvidia.com/tesla/450.80.02/NVIDIA-Linux-x86_64-450.80.02.run
$ sudo sh NVIDIA-Linux-x86_64-450.80.02.run
加速 Docker Hub 镜像拉取速度。
## 另一种方法()
cat << EOF >/etc/docker/daemon.json
{
"registry-mirrors": ["https://75oltije.mirror.aliyuncs.com"]
}
EOF
在国内使用官方的镜像源安装 Ubuntu 应用非常慢,通常配置国内的镜像源来加快速度,如阿里云。
sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list
Kubernetes集群为了不影响性能要禁用交换分区。
之前在文件
/etc/resolv.conf中设置了,过段时间总是自动恢复默认值。(注释中写的很详细,是不可编辑的由系统自动生成的文件)
今天同事安装了一台新的服务器Ubuntu20.04,但用户名和主机名不是我想要的,这里尝试了直接修改Linux文件的方式。
$ uname -n
在 Ubuntu20.04 上安装 nvidia-docker2
$ nano /etc/docker/daemon.json
{
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
}
}
在 Ubuntu20.04 上安装 Docker
$ sudo rm -rf /var/lib/docker
You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.
Jekyll requires blog post files to be named according to the following format:
YEAR-MONTH-DAY-title.MARKUP
Where YEAR is a four-digit number, MONTH and DAY are both two-digit numbers, and MARKUP is the file extension representing the format used in the file. After that, include the necessary front matter.
openssl req -x509 -new -nodes -sha512 -days 3650 \
-subj "/C=CN/ST=Shandong/L=Jinan/O=LNSoft/OU=AI/CN=lnsoft.com" \
-key ca.key \
-out ca.crt
openssl genrsa -out lnsoft.com.key 4096
调整-subj选项中的值以反映您的组织。 如果使用FQDN连接Harbor主机,则必须将其指定为公用名(CN)属性,并在密钥和CSR文件名中使用它。
openssl req -sha512 -new \
-subj "/C=CN/ST=Shandong/L=Jinan/O=LNSoft/OU=AI/CN=lnsoft.com" \
-key lnsoft.com.key \
-out lnsoft.com.csr
生成一个x509 v3扩展文件 cat > v3.
sudo systemctl status nfs-server
sudo cat /proc/fs/nfsd/versions
-2 +3 +4 +4.1 +4.2
sudo nano /etc/exports
/data/nfs 172.16.33.0/24(rw,sync,fsid=0,crossmnt,no_subtree_check)
sudo exportfs -ra
sudo exportfs -v
sudo systemctl restart nfs-server
showmount -e 172.16.33.157
Export list for 172.16.33.157:
/data/nfs 172.16.33.0/24,172.16.128.164
sudo mount -t nfs 172.16.33.157:/ $(pwd)/nfs
sudo umount $(pwd)/nfs
没有找到匹配的文章