GitHub坑记
建仓
github创建新仓库
clone到本地,默认main分支
测试连接
$ ssh -T git@github.com
提交
git add .
git commit -m "message“
git push origin main
暂存
git stash
git stash list
git stahs pop
分支
git branch alter_version
git checkout alter_version
# git checkout -b <branch> create and checkout a new branch
查看远程分支
git fetch
git branch -a
获取远程分支
git checkout -b alter_version origin/alter_version
部分文件合并
git checkout alter_version a.file b.file
删除远程分支
git push origin -d alter_version
删除
git rm filename.type
私仓
Jupyter
ssl
http://www.qb5200.com/article/381584.html
启动环境
https://blog.csdn.net/weixin_44560088/article/details/121050748
服务配置
公网虚拟局域网
https://github.com/SoftEtherVPN/SoftEtherVPN_Stable
https://zhuanlan.zhihu.com/p/414145546
sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j MASQUERADE
https://blog.csdn.net/N_jw107/article/details/119521517
redis
# 配置密码
config get requirepass
config set requirepass "pass"
docker
不用sudo
https://blog.csdn.net/boling_cavalry/article/details/106590784
pytorch
https://www.jianshu.com/p/0afeacdd7234
添加用户组
$ sudo usermod -a -G docker user
docker添加挂载路径:
https://segmentfault.com/q/1010000020514283
docker commit #提交当前容器
docker save #保存镜像
docker load #加载镜像
docker run #从保存的容器重新运行,可修改挂载/端口等路径
docker+pytorch
Initialize the server with nvidia driver support: (linux version)
https://www.nvidia.cn/Download/index.aspx?lang=cn
Install nvidia-docker2:
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html
Pull the pytorch image:
https://hub.docker.com/r/pytorch/pytorch/tags
Run the image with daemon: (container port 8888->host port 12345)
docker run --runtime=nvidia -dit -p 12345:8888 -v /home/ubuntu/docker_share:/home/ pytorch/pytorch:<version> /bin/bash
docker exec -it container_id bash
Problem: cannot activate nvidia runtime without sudo
code-server
local server port:0.0.0.0:8080