Dockerfile 843 Bytes
Newer Older
jerrrrry's avatar
jerrrrry committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 使用官方光源基础镜像
FROM 2.4.1-ubuntu22.04-dtk25.04-py3.10:vllm0.6.2

# 创建目标目录
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.6.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"