@@ -1220,8 +1220,13 @@ def create_dockerfile_cibase(ddir, dockerfile_name, argmap):
1220
1220
1221
1221
1222
1222
def create_dockerfile_linux (
1223
- ddir , dockerfile_name , argmap , backends , repoagents , caches , endpoints
1223
+ ddir , dockerfile_name , argmap , backends , repoagents , caches , endpoints , rt_base_image = None
1224
1224
):
1225
+ base_image = argmap ["BASE_IMAGE" ]
1226
+ #If runtime base image is provided, use it as the base image
1227
+ if rt_base_image :
1228
+ base_image = rt_base_image
1229
+
1225
1230
df = """
1226
1231
ARG TRITON_VERSION={}
1227
1232
ARG TRITON_CONTAINER_VERSION={}
@@ -1230,7 +1235,7 @@ def create_dockerfile_linux(
1230
1235
""" .format (
1231
1236
argmap ["TRITON_VERSION" ],
1232
1237
argmap ["TRITON_CONTAINER_VERSION" ],
1233
- argmap [ "BASE_IMAGE" ] ,
1238
+ base_image ,
1234
1239
)
1235
1240
1236
1241
# PyTorch and TensorFlow backends need extra CUDA and other
@@ -1642,8 +1647,13 @@ def change_default_python_version_rhel(version):
1642
1647
1643
1648
1644
1649
def create_dockerfile_windows (
1645
- ddir , dockerfile_name , argmap , backends , repoagents , caches
1650
+ ddir , dockerfile_name , argmap , backends , repoagents , caches , rt_base_image = None
1646
1651
):
1652
+ base_image = argmap ["BASE_IMAGE" ]
1653
+ #If runtime base image is provided, use it as the base image
1654
+ if rt_base_image :
1655
+ base_image = rt_base_image
1656
+
1647
1657
df = """
1648
1658
ARG TRITON_VERSION={}
1649
1659
ARG TRITON_CONTAINER_VERSION={}
@@ -1666,7 +1676,7 @@ def create_dockerfile_windows(
1666
1676
""" .format (
1667
1677
argmap ["TRITON_VERSION" ],
1668
1678
argmap ["TRITON_CONTAINER_VERSION" ],
1669
- argmap [ "BASE_IMAGE" ] ,
1679
+ base_image ,
1670
1680
)
1671
1681
df += """
1672
1682
WORKDIR /opt
@@ -1744,9 +1754,6 @@ def create_build_dockerfiles(
1744
1754
FLAGS .build_dir , "Dockerfile.buildbase" , dockerfileargmap
1745
1755
)
1746
1756
1747
- #Update dockerfileargmap if rt_base image is provided
1748
- if "rt_base" in images :
1749
- dockerfileargmap ["BASE_IMAGE" ] = images ["rt_base" ]
1750
1757
1751
1758
1752
1759
if target_platform () == "windows" :
@@ -1757,6 +1764,7 @@ def create_build_dockerfiles(
1757
1764
backends ,
1758
1765
repoagents ,
1759
1766
caches ,
1767
+ images .get ("rt_base" ),
1760
1768
)
1761
1769
else :
1762
1770
create_dockerfile_linux (
@@ -1767,6 +1775,7 @@ def create_build_dockerfiles(
1767
1775
repoagents ,
1768
1776
caches ,
1769
1777
endpoints ,
1778
+ images .get ("rt_base" )
1770
1779
)
1771
1780
1772
1781
# Dockerfile used for the creating the CI base image.
0 commit comments