rodrigomasini's picture
Update Dockerfile
1f7d185 verified
raw
history blame
953 Bytes
ARG USERNAME
ARG USER_PWD
ARG GRADIO_PORT
ARG MODEL_NAME
ARG MAX_CONCURRENT_REQUESTS
FROM ghcr.io/huggingface/text-embeddings-inference:latest
ARG USERNAME
ARG USER_PWD
ARG GRADIO_PORT
ARG MODEL_NAME
ARG DTYPE
ARG MAX_CONCURRENT_REQUESTS
ENV TZ=America/New_York \
PORT=3000 \
USERNAME=${USERNAME} \
USER_PWD=${USER_PWD}
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
gnupg \
curl \
gettext \
python3 \
python3-pip && \
rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh.template entrypoint.sh.template
RUN envsubst < "entrypoint.sh.template" > "entrypoint.sh"
RUN cat "entrypoint.sh"
RUN mkdir -p /data/db
RUN chown -R 1000:1000 /data
RUN useradd -m -u 1000 user
# Switch to the "user" user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
COPY app app
RUN pip install -r app/requirements.txt
ENTRYPOINT ["/bin/bash"]
CMD ["entrypoint.sh"]