test-template.j2 2.05 KB
Newer Older
Simon Mo's avatar
Simon Mo committed
1
2
3
4
5
{% set docker_image = "us-central1-docker.pkg.dev/vllm-405802/vllm-ci-test-repo/vllm-test:$BUILDKITE_COMMIT" %}
{% set default_num_gpu = 1 %}
{% set default_working_dir = "/vllm-workspace/tests" %}

steps:
Simon Mo's avatar
Simon Mo committed
6
7
8
9
10
  - label: "AMD Test"
    agents:
      queue: amd
    command: bash .buildkite/run-amd-test.sh

Simon Mo's avatar
Simon Mo committed
11
12
  - label: ":docker: build image"
    commands:
13
      - "docker build --build-arg max_jobs=16 --tag {{ docker_image }} --target test --progress plain ."
Simon Mo's avatar
Simon Mo committed
14
15
16
      - "docker push {{ docker_image }}"
    env:
      DOCKER_BUILDKIT: "1"
17
18
19
20
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 5
Simon Mo's avatar
Simon Mo committed
21
22
23
24
25
26
27
  - wait

  {% for step in steps %}
  - label: "{{ step.label }}"
    agents:
      queue: kubernetes
    soft_fail: {{ step.soft_fail or false }}
28
29
30
    {% if step.parallelism %}
    parallelism: {{ step.parallelism }}
    {% endif %}
31
32
33
34
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 5
Simon Mo's avatar
Simon Mo committed
35
36
37
38
39
40
41
42
43
44
45
    plugins:
      - kubernetes:
          podSpec:
            volumes:
              - name: dshm
                emptyDir:
                  medium: Memory
            containers:
              - image: "{{ docker_image }}"
                command: ["bash"]
                args:
46
                - '-c'
Simon Mo's avatar
Simon Mo committed
47
                - "'cd {{ (step.working_dir or default_working_dir) | safe  }} && {{ step.command  or (step.commands | join(' && ')) | safe }}'"
48
                {% if not step.no_gpu %}
Simon Mo's avatar
Simon Mo committed
49
50
51
52
53
                resources:
                  requests:
                    nvidia.com/gpu: "{{ step.num_gpus or default_num_gpu }}"
                  limits:
                    nvidia.com/gpu: "{{ step.num_gpus or default_num_gpu }}"
54
                {% endif %}
Simon Mo's avatar
Simon Mo committed
55
                env:
yhu422's avatar
yhu422 committed
56
57
                  - name: VLLM_USAGE_SOURCE
                    value: ci-test
Simon Mo's avatar
Simon Mo committed
58
59
60
61
62
63
64
65
66
                  - name: HF_TOKEN
                    valueFrom:
                      secretKeyRef:
                        name: hf-token-secret
                        key: token
                volumeMounts:
                  - mountPath: /dev/shm
                    name: dshm
  {% endfor %}