Morgan Funtowicz
feat(embeddings): initial dockerfile setup
2a31de5
raw
history blame
626 Bytes
ARG SDK_VERSION=latest
FROM huggingface/hfendpoints-sdk:${SDK_VERSION} AS sdk
FROM python:3.12-bookworm
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 torch --index-url https://download.pytorch.org/whl/cpu && \
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"]