README.md 1.98 KB
Newer Older
fengyf1's avatar
fengyf1 committed
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# FUXI

## 项目简介

FUXI 是复旦大学开发的开源 AI 气象模型,采用 Cube Embedding、U-Transformer 等架构,摒弃传统微分方程,以机器学习结合物理规则约束实现预报。支持 15 天全球预报,时间分辨率 6 小时、空间分辨率 0.25°,通过 “低分辨率框架 + 关键区域精细化 + 实时数据校准” 提升精度与效率。

## 环境部署

### 1. 拉取镜像

```
docker pull image.sourcefind.cn:5000/dcu/admin/base/vllm:0.9.2-ubuntu22.04-dtk25.04.1-rc5-rocblas101839-0811-das1.6-py3.10-20250913-rc1
```

### 2. 创建容器

```
docker run -it \
--network=host \
--hostname=localhost \
--name=FUXI_infer \
-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/vllm:0.9.2-ubuntu22.04-dtk25.04.1-rc5-rocblas101839-0811-das1.6-py3.10-20250913-rc1 \
/bin/bash
```

## 测试步骤

### 1. 拉取代码

```
git clone http://developer.sourcefind.cn/codes/bw-bestperf/fuxi.git
cd fuxi
```

### 2. 安装依赖

```
pip install xarray netCDF4 h5netcdf -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install onnxruntime-1.19.2+das.opt2.dtk25041-cp310-cp310-linux_x86_64.whl
```

 ### 4. 下载模型和数据集

**在百度网盘中下载模型文件和数据集:**

https://pan.baidu.com/s/1PDeb-nwUprYtu9AKGnWnNw?pwd=fuxi#list/path=%2

**下载的文件应按以下层次结构组织:**

fengyf1's avatar
fengyf1 committed
61
![](https://developer.sourcefind.cn/codes/bw-bestperf/fuxi/-/raw/main/images/model__structure.png)
fengyf1's avatar
fengyf1 committed
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

### 5. 测试脚本

work_dcu.sh  

```
cd /workspace/fuxi

export HIP_MODULE_LOADING=EAGER
export HIP_ALLOC_INITIALIZE=0

python fuxi.py --model './FuXi_EC' --input './Sample_Data/20231012-06_input_netcdf.nc' --num_steps 10 10 10
#单步 设置 --num_steps 1 1 1
#连续10步 设置 --num_steps 10 10 10

```

**执行测试脚本: ./work_dcu.sh**