File size: 542 Bytes
6f29c26
 
7395889
6f29c26
6520a09
7395889
 
6520a09
7395889
423d606
7395889
1b7eead
 
7395889
d3df147
7395889
423d606
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
ARG SDK_VERSION=latest
FROM huggingface/hfendpoints-sdk:${SDK_VERSION} AS sdk

FROM vllm/vllm-openai:v0.8.4
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/

ENV INTERFACE=0.0.0.0
ENV PORT=80

EXPOSE 80
ENTRYPOINT ["python3"]
CMD ["/usr/local/endpoint/handler.py"]