Dockerfile.template 2.45 KB
Newer Older
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
# syntax=docker/dockerfile:1.10.0-labs
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

{% include "templates/args.Dockerfile" %}

# --- Base Image Stages
{% if framework != "dynamo" %}
    {% include "templates/dynamo_base.Dockerfile" %}
    {% include "templates/wheel_builder.Dockerfile" %}
{% elif framework == "dynamo" %}
    {% if target == "frontend" %}
        {% include "templates/dynamo_base.Dockerfile" %}
        {% include "templates/wheel_builder.Dockerfile" %}
        {% include "templates/dynamo_runtime.Dockerfile" %}
        {% include "templates/frontend.Dockerfile" %}
    {% elif target == "runtime" or target == "dev" or target == "local-dev" %}
        {% include "templates/dynamo_base.Dockerfile" %}
        {% include "templates/wheel_builder.Dockerfile" %}
        {% include "templates/dynamo_runtime.Dockerfile" %}
    {% elif target == "wheel_builder" %}
        {% include "templates/dynamo_base.Dockerfile" %}
        {% include "templates/wheel_builder.Dockerfile" %}
    {% elif target == "base" %}
        {% include "templates/dynamo_base.Dockerfile" %}
    {% endif %}
{% endif %}

29
# --- SGLang Stages
30
31
32
33
{% if framework == "sglang" %}
    # SGLang is the only framework without a `framework` target currently, needs special treatment
    {% include "templates/sglang_runtime.Dockerfile" %}
{% else %}
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# --- No SGLANG stages included
{% endif %}

# --- VLLM Stages
{% if framework == "vllm" %}
    {% include "templates/vllm_framework.Dockerfile" %}
    {% if target != "framework" %}
        {% include "templates/vllm_runtime.Dockerfile" %}
    {% endif %}
{% else %}
# --- No VLLM stages included
{% endif %}

# --- TRTLLM Stages
{% if framework == "trtllm" %}
    {% include "templates/trtllm_framework.Dockerfile" %}
    {% if target != "framework" %}
        {% include "templates/trtllm_runtime.Dockerfile" %}
    {% endif %}
{% else %}
# --- No TRTLLM stages included
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{% endif %}

{% if make_efa == true and target == "runtime" %}
    {% include "templates/aws.Dockerfile" %}
{% endif %}

# --- Development Stages
{% if target == "dev" or target == "local-dev" %}
    {% include "templates/dev.Dockerfile" %}
    {% if make_efa == true %}
        {% include "templates/aws.Dockerfile" %}
    {% endif %}
    {% if target == "local-dev" %}
        {% include "templates/local_dev.Dockerfile" %}
    {% endif %}
{% else %}
# --- No development stages included
{% endif %}