# 在文件顶层指定要使用的镜像 # GitLab Runner 会使用这个镜像来创建任务容器 image: image.sourcefind.cn:5000/dcu/admin/base/custom:vllm0.8.5-ubuntu22.04-dtk25.04-rc7-das1.5-py3.10-20250612-fixpy-rocblas0611-rc2 stages: - test resnet_benchmark_job: stage: test # 关键:指定使用我们刚刚注册的、带有 'dcu' 标签的 Runner tags: - dcu script: - echo "Running inside the powerful DCU container..." # 检查环境 - python -c "import torch; print(f'PyTorch version: {torch.__version__}'); print(f'Device: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else \"CPU\"}')" # 运行我们的压测脚本 - python benchmark_resnet50.py artifacts: paths: - results.json