Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
ci-demo
Commits
4ef18043
Commit
4ef18043
authored
Jan 16, 2026
by
jerrrrry
Browse files
Update .gitlab-ci.yml
parent
3b726d83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
.gitlab-ci.yml
.gitlab-ci.yml
+10
-4
No files found.
.gitlab-ci.yml
View file @
4ef18043
#
在文件顶层指定要使用的
镜像
#
定义流水线要使用的 Docker
镜像
# GitLab Runner 会使用这个镜像来创建任务容器
# 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
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
:
stages
:
-
test
-
test
# 定义一个作业
resnet_benchmark_job
:
resnet_benchmark_job
:
# 指定该作业属于哪个阶段
stage
:
test
stage
:
test
#
关键:
指定使用
我们刚刚注册的、带有 'dcu'
标签的 Runner
# 指定使用
哪个
标签的 Runner
来执行此作业
tags
:
tags
:
-
dcu
-
dcu
# 定义该作业要执行的脚本命令
script
:
script
:
-
echo "Running inside the powerful DCU container..."
-
echo "Running inside the powerful DCU container..."
# 检查
环境
# 检查
PyTorch 环境和设备
-
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 -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
-
python
benchmark_resnet50.py
#
定义作业产物
artifacts:
artifacts:
#
指定要保存的文件或目录
paths:
paths:
-
results.json
-
results.json
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment