# syntax=docker/dockerfile:1.3-labs

ARG FROM_IMAGE_NAME
FROM ${FROM_IMAGE_NAME} as main

RUN apt-get update && \
    apt-get install -y --no-install-recommends gettext && \
    apt-get clean && \
    wget https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_amd64 -O /usr/local/bin/yq && \
    chmod a+x /usr/local/bin/yq

##### For NVIDIANS only #####
FROM main as jet
ARG JET_API_VERSION
RUN --mount=type=secret,id=JET_INDEX_URLS \
    JET_INDEX_URLS=$(cat /run/secrets/JET_INDEX_URLS) && \
    pip install --no-cache-dir jet-api==$JET_API_VERSION "jet-client~=2.0" --upgrade $JET_INDEX_URLS

ENV PATH="$PATH:/opt/jet/bin"
###
