Skip to content

Commit 8c2e72c

Browse files
author
Drasick
committed
bash 脚本补充
1 parent 05dac7b commit 8c2e72c

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
#SBATCH -A wenge
3+
#SBATCH --partition=wenge
4+
#SBATCH --qos=normal
5+
#SBATCH --job-name=install_gemm
6+
#SBATCH --time=00:30:00
7+
#SBATCH --chdir=/data/home/zdhs0100/xtuner/GroupedGEMM
8+
#SBATCH --output=log/install_gemm/%j.log
9+
#SBATCH --error=log/install_gemm/%j.log
10+
#SBATCH --nodes=1
11+
#SBATCH --gres=gpu:1
12+
#SBATCH --cpus-per-task=4
13+
#SBATCH --mem=16G
14+
15+
if [ -f "modules.sh" ]; then
16+
# shellcheck disable=SC1091
17+
source "modules.sh"
18+
fi
19+
20+
module load cuda/12.8
21+
22+
source /data/home/zdhs0100/anaconda3/etc/profile.d/conda.sh
23+
conda activate xtuner
24+
25+
echo "===== GPU Check ====="
26+
nvidia-smi
27+
28+
echo "===== Python ====="
29+
which python
30+
python -c "import torch; print(torch.__version__)"
31+
32+
echo "===== Install ====="
33+
pip install . --no-build-isolation
34+
pip install flash-attn --no-build-isolation

临时文件/modules.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
shell=$(/usr/bin/basename $(/bin/ps -p $$ -ocomm=))
2+
3+
if [ -f /usr/share/modules/init/$shell ]; then
4+
. /usr/share/modules/init/$shell
5+
else
6+
. /usr/share/modules/init/sh
7+
fi

0 commit comments

Comments
 (0)