官方文档
LMOD
软件管理https://lmod.readthedocs.io/en/latest/010_user.html
交大hpc使用lmod
来管理用户软件,每一次重新登陆都会重置module,需要将软件重新load。 常用指令:
1 2 3 4 5 ml ml miniconda3 ml -miniconda3 module spider module spider cuda
oh-my-zsh
更好的shellhpc默认已安装zsh, 通过omzsh的安装脚本进行安装,并安装插件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 export CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) " git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ ${ZSH_CUSTOM:-~/.oh-my-zsh/custom} /plugins/zsh-syntax-highlighting git clone https://github.com/zsh-users/zsh-autosuggestions \ ${ZSH_CUSTOM:-~/.oh-my-zsh/custom} /plugins/zsh-autosuggestions git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf ~/.fzf/install git clone https://github.com/psprint/zsh-navigation-tools ~/.zsh-navigation-tools plugins=( git zsh-navigation-tools rails ruby zsh-syntax-highlighting zsh-autosuggestions ) source ${(q-)ZSH_CUSTOM:-$ZSH /custom} /plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
nvim
更好的编辑器因为在服务器上没有sudo
权限所以需要手动编译
首先使用conda创建编译环境
1 conda create -n nvim-build cmake libtool gettext curl unzip ninja gcc gxx -y -c conda-forge
clone & build
1 2 3 4 git clone https://github.com/neovim/neovim.git cd neovimgit checkout stable make CMAKE_BUILD_TYPE=Release
Tricks 交互式计算资源 某些情况下需要进行并行编译,编译需要耗费大量资源,并不一定可以在登录节点使用:
在这种情况下使用提交作业的方式较为低效,可以申请交互式计算资源
1 srun -p cpu -n 4 --pty /bin/bash
example:
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 (base) chenyulin@pilogin2 ~> srun -p cpu -n 4 --pty /bin/bash srun: job 43090290 queued and waiting for resources srun: job 43090290 has been allocated resources (base) chenyulin@cas242 ~> ls condalist.txt dinov2 log test.slurm (base) chenyulin@cas242 ~> cd dinov2 (base) chenyulin@cas242 ~/dinov2> conda activate dinov2 (dinov2) chenyulin@cas242 ~/dinov2> export CC=$CONDA_PREFIX /bin/gcc main export CXX=$CONDA_PREFIX /bin/g++(dinov2) chenyulin@cas242 ~/dinov2> which g++ main ~/.conda/envs/dinov2/bin/g++ (dinov2) chenyulin@cas242 ~/dinov2> vim conda_cyl.yaml main (dinov2) chenyulin@cas242 ~/dinov2> conda env update -f conda_cyl.yaml main Retrieving notices: ...working... done Channels: - xformers - pytorch - nvidia - conda-forge - defaults - nvidia/label/cuda-11.7.0 Platform: linux-64 Collecting package metadata (repodata.json): done Solving environment: done Installing pip dependencies: |
文件传输 本地向云端传输 使用hpc studio传输https://studio.hpc.sjtu.edu.cn/pun/sys/dashboard/files/fs//lustre/home/acct-umjbyy/chenyulin/Data
云端之间互相传输 例如拷贝conda环境
1 cp -r /lustre/home/acct-umjbyy/chenyulin/.conda /dssg/home/acct-umjbyy/chenyulin/