test-template.j2 1.8 KB
Newer Older
Simon Mo's avatar
Simon Mo committed
1
2
3
4
5
6
7
{% 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:
  - label: ":docker: build image"
    commands:
8
      - "docker build --build-arg max_jobs=16 --tag {{ docker_image }} --target test --progress plain ."
Simon Mo's avatar
Simon Mo committed
9
10
11
      - "docker push {{ docker_image }}"
    env:
      DOCKER_BUILDKIT: "1"
12
13
14
15
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 5
Simon Mo's avatar
Simon Mo committed
16
17
18
19
20
21
22
  - wait

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