Skip to content
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

[CANN] Update CANN Docker image tags #59

Merged
merged 5 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions _static/ascend_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,26 @@ $(document).ready(function () {
if (options['install_type'] === "direct") {
// update select list.
$.each(package_info, function (key, value) {
if (options['npu'] in value)
if (options['npu'] in value) {
cann_version_select.append(new Option("CANN: " + key, key));
}
});
} else {
$.each(package_info, function (key, value) {
// not all version has a docker image.
const tag = key.toLowerCase() + "-" + options['npu'] + "-" + options['os'] + options['os_version'];
const option_tag = key.toLowerCase() + "-" + options['npu'] + "-" + options['os'] + options['os_version'];
const pkg_info = package_info[key][options['npu']];
for (const image of docker_images) {
if (image.split(":")[1] === tag && pkg_info &&
const image_tag = image.split(":")[1];
if (image_tag.includes(option_tag) && pkg_info &&
pkg_info.driver_version && pkg_info.firmware_version) {
cann_version_select.append(new Option("CANN: " + key, key));
break;
}
}
});
}
if (cann_version_select.children().length === 1) {
if (cann_version_select.children().length < 1) {
cann_version_select.children().first().text('无可用版本');
}
cann_version_select.trigger('change');
Expand Down Expand Up @@ -212,10 +214,11 @@ $(document).ready(function () {
$('#use_docker_section').hide();
$('#install_cann_section').show();
} else {
var tag = options['cann'].toLowerCase() + "-" + options['npu'] + "-" + options['os'] + options['os_version'];
for (var i = 0; i < docker_images.length; i++) {
if (docker_images[i].split(":")[1] === tag) {
var dockerCommand = `
const option_tag = options['cann'].toLowerCase() + "-" + options['npu'] + "-" + options['os'] + options['os_version'];
for (let i = 0; i < docker_images.length; i++) {
const image_tag = docker_images[i].split(":")[1];
if (image_tag.includes(option_tag)) {
const dockerCommand = `
docker run \\
--name cann_container \\
--device /dev/davinci1 \\
Expand All @@ -227,7 +230,6 @@ docker run \\
-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 \\
-e DRIVER_PATH=/usr/local/Ascend/driver \\
-it ${docker_images[i]} bash
`;

Expand Down
44 changes: 14 additions & 30 deletions _static/package_info.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const package_info = {
'8.0.RC3': {
'8.0.RC3.beta1': {
x86_64: {
url: 'https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/Milan-ASL/Milan-ASL V100R001C19SPC802/Ascend-cann-toolkit_8.0.RC3.alpha001_linux-x86_64.run'
url: 'https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%208.0.RC3/Ascend-cann-toolkit_8.0.RC3_linux-x86_64.run',
},
aarch64: {
url: 'https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/Milan-ASL/Milan-ASL V100R001C19SPC802/Ascend-cann-toolkit_8.0.RC3.alpha001_linux-aarch64.run'
url: 'https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%208.0.RC3/Ascend-cann-toolkit_8.0.RC3_linux-aarch64.run',
},
'910b': {
driver_version: '23.0.3',
Expand Down Expand Up @@ -253,33 +253,17 @@ const package_info = {


const docker_images = [
'ascendai/cann:7.0.1-310p-ubuntu20.04',
'ascendai/cann:7.0.1-310p-ubuntu22.04',
'ascendai/cann:7.0.1-310p-openeuler20.03',
'ascendai/cann:7.0.1-910-ubuntu20.04',
'ascendai/cann:7.0.1-910-ubuntu22.04',
'ascendai/cann:7.0.1-910-openeuler20.03',
'ascendai/cann:7.0.1-910b-ubuntu20.04',
'ascendai/cann:7.0.1-910b-ubuntu22.04',
'ascendai/cann:7.0.1-910b-openeuler20.03',
'ascendai/cann:8.0.rc1-310p-ubuntu20.04',
'ascendai/cann:8.0.rc1-310p-ubuntu22.04',
'ascendai/cann:8.0.rc1-310p-openeuler20.03',
'ascendai/cann:8.0.rc1-910-ubuntu20.04',
'ascendai/cann:8.0.rc1-910-ubuntu22.04',
'ascendai/cann:8.0.rc1-910-openeuler20.03',
'ascendai/cann:8.0.rc1-910b-ubuntu20.04',
'ascendai/cann:8.0.rc1-910b-ubuntu22.04',
'ascendai/cann:8.0.rc1-910b-openeuler20.03',
'ascendai/cann:8.0.rc2.alpha002-310p-ubuntu20.04',
'ascendai/cann:8.0.rc2.alpha002-310p-ubuntu22.04',
'ascendai/cann:8.0.rc2.alpha002-310p-openeuler20.03',
'ascendai/cann:8.0.rc2.alpha002-910-ubuntu20.04',
'ascendai/cann:8.0.rc2.alpha002-910-ubuntu22.04',
'ascendai/cann:8.0.rc2.alpha002-910-openeuler20.03',
'ascendai/cann:8.0.rc2.alpha002-910b-ubuntu20.04',
'ascendai/cann:8.0.rc2.alpha002-910b-ubuntu22.04',
'ascendai/cann:8.0.rc2.alpha002-910b-openeuler20.03',
'ascendai/cann:7.0.1.beta1-910b-ubuntu22.04-py3.8',
'ascendai/cann:7.0.1.beta1-910b-openeuler22.03-py3.8',
'ascendai/cann:8.0.rc1.beta1-910b-ubuntu22.04-py3.8',
'ascendai/cann:8.0.rc1.beta1-910b-openeuler22.03-py3.8',
'ascendai/cann:8.0.rc2.beta1-910b-ubuntu22.04-py3.9',
'ascendai/cann:8.0.rc2.beta1-910b-ubuntu22.04-py3.10',
'ascendai/cann:8.0.rc2.beta1-910b-openeuler22.03-py3.8',
'ascendai/cann:8.0.rc2.beta1-910b-openeuler22.03-py3.9',
'ascendai/cann:8.0.rc2.beta1-910b-openeuler22.03-py3.10',
'ascendai/cann:8.0.rc3.beta1-910b-ubuntu22.04-py3.10',
'ascendai/cann:8.0.rc3.beta1-910b-openeuler22.03-py3.10',
];

const pytorch_versions = {
Expand Down