Skip to content

zongmin-yu/nus-soc-gpu-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 NUS SoC GPU Cluster Guide

完整的NUS SoC GPU集群使用指南和最佳实践

Platform GPUs Status

📋 概述

本仓库包含了在NUS SoC GPU集群上进行深度学习研究的完整指南、脚本和示例代码。所有内容都经过实际测试验证。

集群信息:

  • 登录节点: xlogin1.comp.nus.edu.sg
  • GPU类型: H100 (96GB), A100 (40GB/80GB), V100 (16GB/32GB)
  • 存储配额: Home 500GB + Scratch 500GB + 临时 3.2TB

🎯 快速开始

# 1. 克隆仓库
git clone https://github.com/YOUR_USERNAME/nus-soc-gpu-guide.git
cd nus-soc-gpu-guide

# 2. 复制示例文件
cp examples/environment.yml ./
cp examples/run-yaml-env-test.sh ./

# 3. 提交第一个作业
sbatch run-yaml-env-test.sh

# 4. 监控进度
squeue -u $USER
tail -f *.out

📂 仓库结构

nus-soc-gpu-guide/
├── docs/                   # 📚 完整文档
│   ├── 00-INDEX.md        # 文档索引
│   ├── 01-15-*.md         # 分类文档
│   └── examples/          # 代码示例
├── scripts/               # 🔧 实用脚本
│   ├── choose-gpu.sh      # GPU选择工具
│   ├── gpu-wait-time.sh   # 等待时间估算
│   └── setup-soc-ssh.sh   # SSH配置
├── examples/              # 💻 工作示例
│   ├── environment.yml    # Conda环境配置
│   ├── train.py          # 训练脚本
│   └── *.sh              # 作业脚本
└── tests/                # ✅ 测试脚本

📖 核心文档

新手必读

环境配置

数据管理

问题解决

🚀 典型工作流程

1. 基础ML训练

# 使用预配置的环境和脚本
cd examples
sbatch run-yaml-env-test.sh

2. 自定义项目

# environment.yml
name: my-project
channels:
  - pytorch
  - nvidia
dependencies:
  - python=3.11
  - pytorch
  - pytorch-cuda=12.1
#!/bin/bash
#SBATCH --gpus=a100-40:1
#SBATCH --time=2:00:00

# 自动安装环境并运行
conda env create -f environment.yml
conda activate my-project
python train.py

💡 最佳实践

✅ 推荐做法

  • 使用YAML管理Conda环境
  • /tmp安装临时环境(速度快10倍)
  • 使用scratch存储大数据集
  • 批量提交作业提高效率

❌ 避免做法

  • 不要在login节点运行计算任务
  • 不要在home目录存储大数据
  • 不要硬编码路径

🔧 实用脚本

GPU选择工具

scripts/choose-gpu.sh
# 根据当前可用性推荐最佳GPU

等待时间估算

scripts/gpu-wait-time.sh
# 估算不同GPU类型的等待时间

SSH配置

scripts/setup-soc-ssh.sh
# 配置服务器间SSH访问

📊 性能基准

基于实际测试结果:

GPU类型 显存 MNIST训练 等待时间
H100 96GB 最快 较长
A100 40GB 快速 中等
V100 16GB 标准 最短

🤝 贡献

欢迎提交问题和改进建议!

📝 许可

MIT License

🙏 致谢

  • NUS School of Computing IT Support
  • SLURM Documentation Team
  • PyTorch Community

作者: zongminy 创建时间: 2025-09-21 最后更新: 2025-09-21 状态: 🟢 Production Ready

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages