Skip to content

Conversation

mkompanek
Copy link

Description

This change extends the Azure Storage (ASFileSystem) client initialization to support DefaultAzureCredential from the Azure Identity library.

  • Introduces #include <azure/identity.hpp> and namespace ai = Azure::Identity;.
  • Adds conditional initialization:
    • If AZURE_USE_DEFAULT_CREDENTIAL is set to "1" or "true", the BlobServiceClient is constructed using DefaultAzureCredential.
    • If account_key_ is provided, Shared Key authentication is used.
    • Otherwise, fallback to anonymous BlobServiceClient.

This enables Triton to authenticate with Azure Storage using Managed Identity, environment-based credentials, or developer tools (VS/CLI), improving integration with Azure-hosted deployments.

Testing

Built and ran Triton inside a container with Azure SDK support enabled.
Inside container I was able to successfully run:
`
az login

tritonserver --model-repository=as://deeplearningstorage.blob.core.windows.net/model-repo
`

FROM nvcr.io/nvidia/tritonserver:25.08-py3 AS base

FROM base AS build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
      && apt-get install -y --no-install-recommends \
         git cmake build-essential wget ca-certificates python3 python3-dev ninja-build pkg-config \
         zlib1g-dev libcurl4-openssl-dev libssl-dev zlib1g-dev uuid-dev pkg-config libkrb5-dev \
         libxml2-dev rapidjson-dev libboost-all-dev libre2-dev \
      && rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/Kitware/CMake/releases/download/v3.31.8/cmake-3.31.8-linux-x86_64.tar.gz \
      && tar -xzf cmake-3.31.8-linux-x86_64.tar.gz -C /usr/local --strip-components=1 \
      && rm cmake-3.31.8-linux-x86_64.tar.gz

COPY . /workspace/core
WORKDIR /workspace/core
RUN mkdir build \
   && cd build \
   && cmake -DCMAKE_INSTALL_PREFIX=/workspace/install -DTRITON_CORE_HEADERS_ONLY=OFF -DTRITON_ENABLE_AZURE_STORAGE=ON .. \
   && make install

FROM base AS final
COPY --from=build /workspace/install/lib/libtritonserver.so /opt/tritonserver/lib
ENV TZ=Europe/Vienna
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get update \
    && apt-get install --no-install-recommends -y bash curl \
    && curl -sL https://aka.ms/InstallAzureCLIDeb | bash \
    && curl -sL https://aka.ms/install-artifacts-credprovider.sh | bash \
    && rm -rf /var/lib/apt/lists/*

ENV AZURE_USE_DEFAULT_CREDENTIAL=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant