# 使用官方光源基础镜像 FROM image.sourcefind.cn:5000/dcu/admin/base/custom:vllm0.8.5-ubuntu22.04-dtk25.04-rc7-das1.5-py3.10-20250521-fixpy-rocblas0521-beta2 # 创建目标目录 RUN mkdir -p /workspace/test/results # 设置工作目录/workspace/test/results方便挂载结果 WORKDIR /workspace/test/results # 将主机上的 test.sh 复制到容器中的 /workspace/test COPY ./run.sh /workspace/test COPY ./benchmark_throughput_0.7.2.py /workspace/test COPY ./models-to-test.cfg /workspace/test # 确保 test.sh 有可执行权限 RUN chmod +x /workspace/test/run.sh # 设置容器启动时运行的命令 # 使用单个 CMD 执行所有命令 CMD bash -c "\ rocm-bandwidth-test > rocm-bandwidth-test.log && \ hy-smi > hy-smi.log && \ hy-smi -c > hy-smi-c.log && \ pip list > pip-list.log && \ lscpu > lscpu.log && \ git clone https://www.ghproxy.cn/github.com/ROCm/rccl-tests.git --depth 1 -b master && \ cd /workspace/test/results/rccl-tests && \ source /opt/dtk/env.sh && \ make MPI=1 MPI_HOME=/opt/mpi ROCM_HOME=/opt/dtk/ NCCL_HOME=/opt/dtk/rccl/ CUSTOM_RCCL_LIB=/opt/dtk/rccl/lib/librccl.so -j32 && \ ./build/all_reduce_perf -b 8 -e 1G -f 2 -g 8 > /workspace/test/results/all_reduce_perf_8.log && \ ./build/all_reduce_perf -b 4 -e 1G -f 2 -g 4 > /workspace/test/results/all_reduce_perf_4.log && \ cd /workspace/test/results && \ git clone http://developer.sourcefind.cn/codes/OpenDAS/dcu_env_check.git && \ apt-get update && \ apt-get install -y iproute2 dmidecode ipmitool && \ cd /workspace/test/results/dcu_env_check && \ bash system_check.sh > /workspace/test/results/system_check.log && \ cd /workspace/test/results && \ bash /workspace/test/run.sh > test.log 2>&1"