-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] Improve readme and support uploading readme to dockerhub #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wxsIcey
wants to merge
11
commits into
main
Choose a base branch
from
modify_readme
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ab90d94
[Feat] Improve readme and support uploading readme to dockerhub
wxsIcey 8e33916
test push README to Quay.io and DockerHub
wxsIcey 24053a4
test
wxsIcey f1f0092
test
wxsIcey fe18dce
recovery code
wxsIcey e858b19
fix readme
wxsIcey 9fe695a
test
wxsIcey 0f3abe1
fix readme
wxsIcey 7138625
test
wxsIcey 6f7ca8e
recovery
wxsIcey f32a2cf
fix
wxsIcey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
## Quick reference | ||
- 官方的 CANN Ascend docker镜像 | ||
- 如何获取帮助:[Ascend Community](https://www.hiascend.com/forum/) | ||
|
||
## CANN | ||
CANN(Compute Architecture for Neural Networks)是昇腾针对AI场景推出的异构计算架构,对上支持多种AI框架,对下服务AI处理器与编程,发挥承上启下的关键作用,是提升昇腾AI处理器计算效率的关键平台。同时针对多样化应用场景,提供高效易用的编程接口,支持用户快速构建基于昇腾平台的AI应用和业务。<br> | ||
<br> | ||
Ascend-CANN镜像,基于Ubuntu OS或openEuler OS,内部集成系统包、Python和CANN (Toolkit开发套件包、Kernels算子包、NNAL加速库)制作。用户根据实际需要,基于该基础镜像安装人工智能框架,即可运行相应业务程序。 | ||
|
||
## 支持的tags和相应的Dockerfile链接 | ||
|
||
每个CANN镜像的tag由CANN版本号和基础镜像版本号组成,具体如下 | ||
|
||
- [`8.1.RC1.alpha002-910b-openeuler24.03-py3.10`](https://github.com/Ascend/cann-container-image/blob/main/cann/8.1.RC1.alpha002-910b-openeuler24.03-py3.10/Dockerfile) | ||
- [`8.1.RC1.alpha002-910b-ubuntu24.04-py3.10`](https://github.com/Ascend/cann-container-image/blob/main/cann/8.1.RC1.alpha002-910b-ubuntu24.04-py3.10/Dockerfile) | ||
- [`8.1.RC1.alpha001-910b-openeuler22.03-py3.10`](https://github.com/Ascend/cann-container-image/blob/main/cann/8.1.RC1.alpha001-910b-openeuler22.03-py3.10/Dockerfile) | ||
- [`8.1.RC1.alpha001-910b-ubuntu22.04-py3.10`](https://github.com/Ascend/cann-container-image/blob/main/cann/8.1.RC1.alpha001-910b-ubuntu22.04-py3.10/Dockerfile) | ||
|
||
## 使用方法 | ||
|
||
### 快速入门:支持的设备 | ||
- Atlas A2训练系列 (Atlas 800T A2, Atlas 900 A2 PoD, Atlas 200T A2 Box16, Atlas 300T A2) | ||
- Atlas 800I A2推理系列 (Atlas 800I A2) | ||
|
||
### 快速入门:使用容器设置环境 | ||
|
||
```bash | ||
# 假设您的NPU设备安装在/dev/davinci1上,并且您的NPU驱动程序安装在/usr/local/Ascend上: | ||
docker run \ | ||
--name cann_container \ | ||
--device /dev/davinci1 \ | ||
--device /dev/davinci_manager \ | ||
--device /dev/devmm_svm \ | ||
--device /dev/hisi_hdc \ | ||
-v /usr/local/dcmi:/usr/local/dcmi \ | ||
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \ | ||
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \ | ||
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \ | ||
-v /etc/ascend_install.info:/etc/ascend_install.info \ | ||
-it ascend/cann:tag bash | ||
``` | ||
### 说明: | ||
执行CANN环境变量脚本`/usr/local/Ascend/nnal/atb/set_env.sh`时配置abi参数:<br> | ||
<br> | ||
**自动配置**:执行set_env.sh脚本时,若不加任何参数,且已检测到PyTorch环境时会自动调用`torch.compiled_with_cxx11_abi()`接口,自动选择PyTorch编译时abi参数作为ATB的abi参数,如果没有检测到PyTorch环境则默认配置`abi=1`。<br> | ||
<br> | ||
**手动配置**:执行set_env.sh时,支持用户通过`--cxx_abi=1`和`--cxx_abi=0`参数指定ATB的abi参数。<br> | ||
<br> | ||
在CANN 8.1.RC1.alpha002及以后版本的镜像中,使用ENV定义ATB的`abi=1`(默认按照没有检测到PyTorch环境处理),并在以Bash Shell方式启动容器时`source /usr/local/Ascend/nnal/atb/set_env.sh`,确保abi参数的值正确。但若您以其他方式启动容器,abi的值为1,若不满足要求,您可手动自行指定ATB的abi参数值。 | ||
|
||
## 问答 | ||
|
||
若您没有找到想要的CANN镜像或者在使用镜像时发现任何问题,请随时向我们提出[issue](https://github.com/Ascend/cann-container-image/issues)。 | ||
|
||
|
||
# 许可证 | ||
|
||
[Apache License, Version 2.0](https://github.com/Ascend/cann-container-image/blob/main/LICENSE) | ||
|
||
与所有 Docker 镜像一样,这些镜像可能还包含其他可能受其他许可证约束的软件(例如基础发行版中的 Bash 等,以及所包含主要软件的任何直接或间接依赖项)。 | ||
|
||
对于任何预构建镜像的使用,镜像用户有责任确保此镜像的任何使用均符合其中包含的所有软件的相关许可证。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
readonly file="$1" | ||
readonly registry_mappings="$2" | ||
readonly registries="quay.io docker.io" | ||
|
||
# install docker-pushrm plugin | ||
if [ ! -d "$HOME/.docker/cli-plugins" ]; then | ||
sudo mkdir -p "$HOME/.docker/cli-plugins" | ||
fi | ||
if [ ! -f $HOME/.docker/cli-plugins/docker-pushrm ]; then | ||
if [ "$(uname)" = "Darwin" ]; then | ||
sys="darwin" | ||
elif [ "$(uname)" = "Linux" ]; then | ||
sys="linux" | ||
else | ||
echo "Unsupported system:" $(uname) | ||
exit 1 | ||
fi | ||
if [ "$(uname -m)" = "x86_64" ]; then | ||
curl -fSL -o $HOME/.docker/cli-plugins/docker-pushrm https://github.com/christian-korneck/docker-pushrm/releases/download/v1.9.0/docker-pushrm_${sys}_amd64 | ||
elif [ "$(uname -m)" == "aarch64" ]; then | ||
curl -fSL -o $HOME/.docker/cli-plugins/docker-pushrm https://github.com/christian-korneck/docker-pushrm/releases/download/v1.9.0/docker-pushrm_${sys}_arm64 | ||
else | ||
echo "Unsupported architecture:" $(uname -m) | ||
exit 1 | ||
fi | ||
sudo chmod +x $HOME/.docker/cli-plugins/docker-pushrm | ||
fi | ||
|
||
# The format should be "registry1:namespace1/repo1,registry2:namespace2/repo2" | ||
IFS=',' read -ra mappings <<< "$registry_mappings" | ||
declare -A target_map | ||
for mapping in "${mappings[@]}"; do | ||
IFS=':' read -r registry target <<< "$mapping" | ||
target_map[$registry]="$target" | ||
done | ||
|
||
# push readme to all specified registries | ||
for registry in ${registries}; do | ||
if [[ -v target_map[$registry] ]]; then | ||
target="${target_map[$registry]}" | ||
docker login ${registry} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How to login these registries in CI? |
||
docker pushrm -f ${file} ${registry}/${target} | ||
echo "Succeed to push README to" ${registry}/${target} | ||
else | ||
echo "No target specified for registry ${registry}, skipping" | ||
fi | ||
done |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about ghcr.io?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前一直没有上传镜像到ghcr.io,且docker-pushrm目前只支持DockerHub、Quay、Harbor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ghcr.io 抽空也加下吧,ghcr.io 展示的 README 我记得就是 repo 根目录的 README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker-pushrm目前只支持DockerHub、Quay、Harbor