Commit 63ef0c61 authored by dcuai's avatar dcuai
Browse files

更换dtk24.04.1镜像

parent e0b10e40
...@@ -28,13 +28,15 @@ GLM-4-9B 是智谱 AI 推出的最新一代预训练模型 GLM-4 系列中的开 ...@@ -28,13 +28,15 @@ GLM-4-9B 是智谱 AI 推出的最新一代预训练模型 GLM-4 系列中的开
[光源](https://www.sourcefind.cn/#/service-details)拉取docker镜像的地址与使用步骤 [光源](https://www.sourcefind.cn/#/service-details)拉取docker镜像的地址与使用步骤
``` ```
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu22.04-dtk23.10.1-py310 docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu20.04-dtk24.04.1-py3.10
docker run -it -v /path/your_code_data/:/path/your_code_data/ -v /opt/hyhal/:/opt/hyhal/:ro --shm-size=64G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name glm-4v <your imageID> bash docker run -it -v /path/your_code_data/:/path/your_code_data/ -v /opt/hyhal/:/opt/hyhal/:ro --shm-size=64G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name glm-4v <your imageID> bash
cd /path/your_code_data/ cd /path/your_code_data/
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
#开发者社区下载bitsandbytes
pip install bitsandbytes-0.42.0+das1.1.gitce85679.abi1.dtk2404.torch2.1.0-py3-none-any.whl
``` ```
### Dockerfile(方法二) ### Dockerfile(方法二)
...@@ -44,12 +46,15 @@ cd /path/your_code_data/docker ...@@ -44,12 +46,15 @@ cd /path/your_code_data/docker
docker build --no-cache -t glm-4v:latest . docker build --no-cache -t glm-4v:latest .
docker run --shm-size=64G --name glm-4v -v /opt/hyhal:/opt/hyhal:ro --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video -v /path/your_code_data/:/path/your_code_data/ -it glm-4v bash docker run --shm-size=64G --name glm-4v -v /opt/hyhal:/opt/hyhal:ro --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video -v /path/your_code_data/:/path/your_code_data/ -it glm-4v bash
#开发者社区下载bitsandbytes
pip install bitsandbytes-0.42.0+das1.1.gitce85679.abi1.dtk2404.torch2.1.0-py3-none-any.whl
``` ```
### Anaconda(方法三) ### Anaconda(方法三)
关于本项目DCU显卡所需的特殊深度学习库可从[光合](https://developer.hpccube.com/tool/)开发者社区下载安装。 关于本项目DCU显卡所需的特殊深度学习库可从[光合](https://developer.hpccube.com/tool/)开发者社区下载安装。
``` ```
DTK驱动:dtk23.10 DTK驱动:dtk24.04.1
python:python3.10 python:python3.10
torch:2.1 torch:2.1
torchvision: 0.16.0 torchvision: 0.16.0
...@@ -65,6 +70,8 @@ conda activate glm-4v ...@@ -65,6 +70,8 @@ conda activate glm-4v
cd /path/your_code_data/ cd /path/your_code_data/
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple
#开发者社区下载bitsandbytes
pip install bitsandbytes-0.42.0+das1.1.gitce85679.abi1.dtk2404.torch2.1.0-py3-none-any.whl
``` ```
## 数据集 ## 数据集
...@@ -115,7 +122,7 @@ sh lora_finetune_multi.sh ...@@ -115,7 +122,7 @@ sh lora_finetune_multi.sh
### 单机单卡 ### 单机单卡
推理时需修改推理脚本中的模型地址为本地模型地址 推理时根据实际路径修改模型地址、图片路径
`tokenizer = AutoTokenizer.from_pretrained("/home/wanglch/projects/GLM-4V/glm-4v-9b", trust_remote_code=True)` `tokenizer = AutoTokenizer.from_pretrained("/home/wanglch/projects/GLM-4V/glm-4v-9b", trust_remote_code=True)`
......
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