Files
TorchNPU/docker/Dockerfile
T
mengmeizi05 6963820e8a docs:去掉英文版不合规的违禁词或修改
Co-authored-by: s50057208<shiyunhan1@huawei.com>



# message auto-generated for no-merge-commit merge:
!36629 merge master_fix_tag into master

docs:去掉英文版不合规的违禁词或修改

Created-by: mengmeizi05
Commit-by: s50057208
Merged-by: ascend-robot
Description: <!--
PR描述模板更新日期:20260203
-->

# 【合入来源】
> <font color="red">**如有社区issue,请关联issue链接**</font>\
> <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font>

- [ ] 需求
- [ ] 问题单
- [ ] issue/工单
- [ ] 重构优化
- [ ] 资料更新

# 【修改方案】
去掉英文版不合规的违禁词或修改

# 【资料变更】
> 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及”

# 【接口变更】
> 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及”

# 【功能验证】
> 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\
> 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图

# 【CheckList】
> PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

- [ ] 代码注释完备,正确记录错误日志
- [ ] 代码实现进行了返回值、空指针等校验
- [ ] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等
- [ ] PR持续集成流水线(CI)执行通过,代码检查无异常


See merge request: Ascend/pytorch!36629
2026-06-03 11:03:18 +08:00

35 lines
2.2 KiB
Docker

ARG CANN_VERSION
ARG CHIP_ARCH
ARG OS
ARG OS_VERSION
ARG PY_VERSION
FROM quay.io/ascend/cann:${CANN_VERSION}-${CHIP_ARCH}-${OS}${OS_VERSION}-py${PY_VERSION} AS base
ARG ARCH
ARG PY_TAG
ARG TORCH_NPU_PATCH_TAG
ARG TORCH_NPU_RELEASE_TAG
ARG MANYLINUX_VER=manylinux_2_28
ARG PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip3 config set global.index-url ${PIP_INDEX_URL}
RUN TORCH_VERSION=$(echo "${TORCH_NPU_RELEASE_TAG}" | sed -E 's/.*pytorch([0-9.]+).*/\1/') \
&& if [ "${ARCH}" = "arm" ]; then \
wget https://download.pytorch.org/whl/cpu/torch-${TORCH_VERSION}%2Bcpu-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_aarch64.whl \
&& pip3 install --no-cache-dir --progress-bar off torch-${TORCH_VERSION}+cpu-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_aarch64.whl \
&& rm -f torch-${TORCH_VERSION}+cpu-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_aarch64.whl \
&& wget https://gitcode.com/Ascend/pytorch/releases/download/${TORCH_NPU_RELEASE_TAG}/torch_npu-${TORCH_NPU_PATCH_TAG}-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_aarch64.whl \
&& pip3 install --no-cache-dir --progress-bar off torch_npu-${TORCH_NPU_PATCH_TAG}-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_aarch64.whl \
&& rm -f torch_npu-${TORCH_NPU_PATCH_TAG}-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_aarch64.whl; \
else \
wget https://download.pytorch.org/whl/cpu/torch-${TORCH_VERSION}%2Bcpu-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_x86_64.whl \
&& pip3 install --no-cache-dir --progress-bar off torch-${TORCH_VERSION}+cpu-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_x86_64.whl \
&& rm -f torch-${TORCH_VERSION}+cpu-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_x86_64.whl \
&& wget https://gitcode.com/Ascend/pytorch/releases/download/${TORCH_NPU_RELEASE_TAG}/torch_npu-${TORCH_NPU_PATCH_TAG}-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_x86_64.whl \
&& pip3 install --no-cache-dir --progress-bar off torch_npu-${TORCH_NPU_PATCH_TAG}-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_x86_64.whl \
&& rm -f torch_npu-${TORCH_NPU_PATCH_TAG}-${PY_TAG}-${PY_TAG}-${MANYLINUX_VER}_x86_64.whl; \
fi \
&& pip3 install --no-cache-dir --progress-bar off pyyaml numpy attrs>=23.0.0 decorator>=5.1.0 psutil>=5.9 scipy>=1.7.3 jinja2 MarkupSafe