# 使用官方光源基础镜像 FROM vllm:085 # 创建目标目录 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 ./topo.xml /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.txt && \ hy-smi > hy-smi.txt && \ hy-smi -c > hy-smi-c.txt && \ pip list > pip-list.txt && \ lscpu > lscpu.txt && \ bash /workspace/test/run.sh > test.log 2>&1"