# ARG SDK_VERSION=6751aaa | |
ARG SDK_VERSION=v0.2.0 | |
FROM huggingface/hfendpoints-sdk:${SDK_VERSION} AS sdk | |
FROM nvcr.io/nvidia/nemo:25.04 | |
RUN --mount=type=bind,from=sdk,source=/opt/hfendpoints/dist,target=/usr/local/endpoints/dist \ | |
--mount=type=bind,source=requirements.txt,target=/tmp/requirements.txt \ | |
python3 -m pip install -r /tmp/requirements.txt && \ | |
python3 -m pip install /usr/local/endpoints/dist/*.whl | |
COPY handler.py /usr/local/endpoint/handler.py | |
# Disable TQDM | |
ENV TQDM_DISABLE=1 | |
# Network interface | |
ENV INTERFACE=0.0.0.0 | |
ENV PORT=80 | |
EXPOSE 80 | |
ENTRYPOINT ["python3"] | |
CMD ["/usr/local/endpoint/handler.py"] | |