File size: 1,025 Bytes
765f4b5 b89115f 433b752 36cce89 b81c2c5 433b752 765f4b5 d61a05e b81c2c5 d61a05e 433b752 765f4b5 71cc590 765f4b5 433b752 20c918b 433b752 6189109 39b5f6a 4765b26 b454b26 433b752 a9bffd0 433b752 94641ea 370254e 3061469 0f79948 9bd04be |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
ARG USERNAME
ARG USER_PWD
ARG GRADIO_PORT
ARG MODEL_NAME
ARG QUANTIZATION
ARG MAX_CONCURRENT_REQUESTS
ARG MAX_INPUT_LENGTH
ARG MAX_TOTAL_TOKENS
FROM ghcr.io/huggingface/text-generation-inference:latest
ARG USERNAME
ARG USER_PWD
ARG GRADIO_PORT
ARG MODEL_NAME
ARG QUANTIZATION
ARG MAX_CONCURRENT_REQUESTS
ARG MAX_INPUT_LENGTH
ARG MAX_TOTAL_TOKENS
ENV TZ=Europe/Paris \
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 && \
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"] |