diff --git a/AI/pytorch/2.6.0-tcmalloc2.10/23/Dockerfile b/AI/pytorch/2.6.0-tcmalloc2.10/23/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..76a3f91b3d3ebaffd664beca568f9d8aff01f553 --- /dev/null +++ b/AI/pytorch/2.6.0-tcmalloc2.10/23/Dockerfile @@ -0,0 +1,23 @@ +FROM registry.openanolis.cn/openanolis/anolisos:23.3 + +LABEL \ + maintainer="OpenAnolis AI SIG" \ + org.opencontainers.image.title="tcmalloc" \ + org.opencontainers.image.version="2.10" \ + org.opencontainers.image.date="20250928" + +RUN yum -y install python3.10 python3.10-pip make tar autoconf gcc gcc-c++ wget && \ + update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 30 &&\ + pip3.10 install -i https://pypi.openanolis.cn/prod/simple torch --timeout=30 && \ + wget https://github.com/gperftools/gperftools/releases/download/gperftools-2.10/gperftools-2.10.tar.gz && \ + tar -xvf gperftools-2.10.tar.gz && \ + cd gperftools-2.10 && \ + ./configure --disable-debugalloc && \ + make && make install && \ + echo "/usr/local/lib/libtcmalloc.so.4" >> /etc/ld.so.preload && \ + echo "export OMP_NUM_THREADS=\$(nproc --all)" >> /etc/profile.d/env.sh && \ + echo "export GOMP_CPU_AFFINITY=0-\$(( \$(nproc --all) - 1 ))" >> /etc/profile.d/env.sh && \ + rm -rf gperftools-2.10.tar.gz gperftools-2.10 + + +CMD ["/bin/bash"] diff --git a/AI/pytorch/buildspec.yml b/AI/pytorch/buildspec.yml index 8c7eb0dea56cde90513c9a4d001675d01eda56ff..623205a9f89ae3f16771af488f90c93949d00bab 100644 --- a/AI/pytorch/buildspec.yml +++ b/AI/pytorch/buildspec.yml @@ -44,3 +44,15 @@ images: registry: [*ACR_PROD] # 测试配置 test_config: [*WORKSPACE, *PROJECT, *TEST_SUITE, *TEST_CONF, *TEST_CASE, *CLOUD_SERVER_TAG[0], ''] + BuildPytorch2.6.0-tcmalloc-2.10DockerImage: + # 定义是否构建参数 + build: true + docker_file: + path: AI/pytorch/2.6.0-tcmalloc2.10/23/Dockerfile + scene: + args: [] + tags: [2.6.0-tcmalloc2.10-23] + registry: [*ACR_PROD] + # 测试配置 + test_config: [*WORKSPACE, *PROJECT, *TEST_SUITE, *TEST_CONF, *TEST_CASE, *CLOUD_SERVER_TAG[0], ''] +