Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
majorli a51cf9405c | 11 months ago | |
---|---|---|
.. | ||
Dockerfile | 11 months ago | |
README.md | 11 months ago |
本文档旨在协助社区用户在本地构建出在天数智芯加速卡上运行的DeepSparkHub容器镜像,以运行仓库中的模型。
访问CUDA Toolkit 10.2 Download页面获取Linux版CUDA离线安装包。
访问天数智芯官网-资源中心页面获取Linux版软件栈离线安装包:
下载好的离线安装包解压后放入docker/Iluvatar目录。
软件栈版本对应关系可参看DeepSparkHub版本日志。离线安装包解压放置好后的目录如下所示:
docker/Iluvatar
├── 3.7 ## Python3.7 版本whl包,离线包已包含,无需另外下载
├── corex-installer-***.run ## 软件栈离线安装包
├── cuda_***_linux.run ## CUDA离线安装包
└── Dockerfile ## 镜像构建模板文件
设置deepsparkhub信息:
## 设置镜像名称
$ IMAGE_NAME=deepsparkhub
## 设置镜像版本,与DeepSparkHub发布版本号对应
$ IMAGE_VERSION=23.06
设置离线安装包名称:
$ COREX_INSTALL=corex-installer-***.run
$ CUDA_INSTALL=cuda_***_linux.run
构建容器镜像:
$ docker build --build-arg IMAGE_VERSION=${IMAGE_VERSION} \
--build-arg CUDA_INSTALL=${CUDA_INSTALL} \
--build-arg COREX_INSTALL=${COREX_INSTALL} \
-t ${IMAGE_NAME}:${IMAGE_VERSION} .
确认镜像构建成功:
$ docker images | grep ${IMAGE_NAME}
运行容器:
## 设置容器名称
$ DOCKER_NAME=deepsparkhub_test
## 启动容器
$ sudo docker run -itd --name ${DOCKER_NAME} \
--privileged --cap-add=ALL \
--ipc=host --pid=host ${IMAGE_NAME}:${IMAGE_VERSION}
## 登录容器
$ docker exec -it ${DOCKER_NAME} bash
## 初始目录为 /root/deepsparkhub
$ pwd
/root/deepsparkhub
模型训练:
以PyTorch版的ResNet50模型为例,如需运行其他模型,参考对应模型目录的README文档。
## 切换到ResNet50的PyTorch模型目录
$ cd cv/classification/resnet50/pytorch/
## 查看模型README文档
$ cat README.md
## 下载好ImageNet数据集后,指定路径并运行ResNet50模型
$ PATH_TO_IMAGENET=/path/to/imagenet
$ export CUDA_VISIBLE_DEVICES=0
$ bash scripts/fp32_1card.sh --data-path ${PATH_TO_IMAGENET}
DeepSparkHub甄选上百个应用算法和模型,覆盖AI和通用计算各领域,支持主流市场智能计算落地应用场景。
Python Unity3D Asset Text Jupyter Notebook C++ other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》