FROM ghcr.io/huggingface/text-embeddings-inference:86-1.2 RUN useradd -m -u 1000 user RUN mkdir -p /data RUN chown -R user /data RUN chmod -R 777 /data RUN mkdir -p /home/user/.cache/huggingface RUN chown -R user /home/user/.cache/huggingface RUN chmod -R 777 /home/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 ENTRYPOINT text-embeddings-router --model-id BAAI/bge-large-en-v1.5 --port 3000 --hf-api-token $HF_TOKEN --api-key $HF_TOKEN --huggingface-hub-cache /home/user/.cache/huggingface