tei / Dockerfile
nsarrazin's picture
nsarrazin HF Staff
try this
01225c8 unverified
raw
history blame
775 Bytes
FROM ghcr.io/huggingface/text-embeddings-inference:86-1.2
# RUN useradd -m -u 1000 user
# # Switch to the "user" user
# USER user
# # Set home to the user's home directory
# ENV HOME=/home/user \
# PATH=/home/user/.local/bin:$PATH
# # Set the working directory to the user's home directory
# WORKDIR $HOME/app
# write secret to /home/user/.cache/huggingface/token
# first create the file and directory if needed
RUN mkdir -p /home/user/.cache/huggingface
# RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true echo $HF_TOKEN > /home/user/.cache/huggingface/token
ENTRYPOINT ["text-embeddings-router", "--model-id", "BAAI/bge-large-en-v1.5", "--hf-api-token", "$HF_TOKEN", "--api-key", "$HF_TOKEN", "--huggingface-hub-cache", "/home/user/.cache/huggingface"]