Commit 652c6426 authored by zhangwenbo's avatar zhangwenbo 🎨
Browse files

Update README.md

parent f30dad25
# https://github.com/maziarraissi/HFM
## 论文
Application of Deep Learning Methods for Distinguishing Gamma-Ray Bursts from Fermi/GBM TTE Data
- https://arxiv.org/abs/2303.00370
# HFM
## 模型简介
......@@ -13,56 +8,75 @@ HFM是一种基于物理学的深度学习框架,能够对控制流体运动
## 环境配置
### Docker(方法一)
docker pull image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.13.1-py3.10-dtk24.04.3-ubuntu20.04
### 1. 拉取镜像
```bash
docker pull image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.18.0-ubuntu22.04-dtk25.04.2-py3.10
```
### 2. 创建容器
docker run --shm-size 50g --network=host --name=binary_distinguish_GRB_by_DL --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v 项目地址(绝对路径):/home/ -v /opt/hyhal:/opt/hyhal:ro -it <your IMAGE ID> bash
```bash
docker run -it \
--network=host \
--hostname=localhost \
--name HFM \
-v /opt/hyhal:/opt/hyhal:ro \
-v $PWD:/workspace \
--ipc=host \
--device=/dev/kfd \
--device=/dev/mkfd \
--device=/dev/dri \
--shm-size=512G \
--privileged \
--group-add video \
--cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.18.0-ubuntu22.04-dtk25.04.2-py3.10 \
/bin/bash
```
pip install scipy -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
---
## 测试步骤
### Dockerfile(方法二)
### 1. 拉取代码
docker build -t <IMAGE_NAME>:<TAG> .
```bash
git clone http://developer.sourcefind.cn/codes/bw-bestperf/hfm.git
cd hfm/
```
docker run --shm-size 50g --network=host --name=binary_distinguish_GRB_by_DL --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v 项目地址(绝对路径):/home/ -v /opt/hyhal:/opt/hyhal:ro -it <your IMAGE ID> bash
### 2. 安装依赖
pip install scipy -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
```bash
pip install scipy -i https://mirrors.aliyun.com/pypi/simple/
```
### 3. 获取优化包
curl -f -C - -o rocblas-install-1126-5bug.tar.gz https://ksefile.hpccube.com:65241/efile/s/d/emhhbmd3YjM=/7420623cbac23efd
#设置环境变量
CURRENT_DIR=$(pwd)
export LD_LIBRARY_PATH=$CURRENT_DIR/rocblas-install/lib:$LD_LIBRARY_PATH
#验证环境变量设置
echo $LD_LIBRARY_PATH | tr ':' '\n' | head -3
## 数据集
### 3. 下载数据集
[数据下载地址](https://o365coloradoedu-my.sharepoint.com/:f:/g/personal/mara4513_colorado_edu/EnMZcTjA6BVBjovGVJT3hk4BIemGxYF9lO6ry0SyizIjoQ?e=fuHKi2)
#仅下载Cylinder2D.mat即可
```
Data
├── Aneurysm3D.mat
├── Cylinder2D.mat
├── Cylinder2D_flower.mat
├── Cylinder2D_Re200Pec200_Dirichlet_Streaks_Forces.mat
├── Cylinder2D_Re200Pec200_Neumann_Streaks_Forces.mat
└── Cylinder2D_Re200Pec2000_Dirichlet_Streaks.mat
└── ......
```
## 训练
- DCU :K100 AI
```bash
cd Source
python Cylinder2D.py > Cylinder2D_stdout.txt
python Stenosis2D.py > Stenosis2D_stdout.txt
python Aneurysm3D.py > Aneurysm3D_stdout.txt
python Cylinder2D_Pec_Re.py > Cylinder2D_Pec_Re_stdout.txt
python Stenosis2D_Pec_Re.py > Stenosis2D_Pec_Re_stdout.txt
python Davinci.py > Davinci_stdout.txt
python Cylinder3D.py > Cylinder3D_stdout.txt
python Cylinder2D_flower.py > Cylinder2D_flower_stdout.txt
python Cylinder2D_No_Slip.py > Cylinder2D_No_Slip_stdout.txt
python Cylinder2D_flower_convergence_plot.py > Cylinder2D_flower_convergence_plot_stdout.txt
python Aneurysm3D_Wall_Stresses.py > Aneurysm3D_Wall_Stresses_stdout.txt
export TF_XLA_FLAGS="--tf_xla_auto_jit=1"
numactl --cpunodebind=3 --membind=3 python Cylinder2D.py > Cylinder2D_stdout.txt
```
注:多卡和其他相关训练参见Scripts
## 推理
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment