Spaces:
Running
on
A10G
Running
on
A10G
Create INCLUDE_DB
#9
by
JorgeDeC
- opened
- Dockerfile +5 -2
- defaults/INCLUDE_DB +1 -0
Dockerfile
CHANGED
@@ -3,6 +3,7 @@ ARG MODEL_PARAMS
|
|
3 |
ARG MODEL_PROMPT_TEMPLATE
|
4 |
ARG APP_COLOR
|
5 |
ARG APP_NAME
|
|
|
6 |
|
7 |
|
8 |
FROM node:20 as chatui-builder
|
@@ -11,6 +12,7 @@ ARG MODEL_PARAMS
|
|
11 |
ARG APP_COLOR
|
12 |
ARG APP_NAME
|
13 |
ARG MODEL_PROMPT_TEMPLATE
|
|
|
14 |
|
15 |
WORKDIR /app
|
16 |
|
@@ -18,7 +20,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
|
|
18 |
git gettext && \
|
19 |
rm -rf /var/lib/apt/lists/*
|
20 |
|
21 |
-
|
22 |
RUN git clone https://github.com/huggingface/chat-ui.git
|
23 |
|
24 |
WORKDIR /app/chat-ui
|
@@ -34,6 +35,7 @@ RUN --mount=type=secret,id=MONGODB_URL,mode=0444 \
|
|
34 |
&& MODEL_PARAMS="${MODEL_PARAMS:="$(cat /defaults/MODEL_PARAMS)"}" && export MODEL_PARAMS \
|
35 |
&& MODEL_PROMPT_TEMPLATE="${MODEL_PROMPT_TEMPLATE:="$(cat /defaults/MODEL_PROMPT_TEMPLATE)"}" && export MODEL_PROMPT_TEMPLATE \
|
36 |
&& APP_COLOR="${APP_COLOR:="$(cat /defaults/APP_COLOR)"}" && export APP_COLOR \
|
|
|
37 |
&& APP_NAME="${APP_NAME:="$(cat /defaults/APP_NAME)"}" && export APP_NAME \
|
38 |
&& MONGODB_URL=$(cat /run/secrets/MONGODB_URL > /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL && \
|
39 |
echo "${MONGODB_URL}" && \
|
@@ -55,6 +57,7 @@ ARG MODEL_PARAMS
|
|
55 |
ARG MODEL_PROMPT_TEMPLATE
|
56 |
ARG APP_COLOR
|
57 |
ARG APP_NAME
|
|
|
58 |
|
59 |
ENV TZ=Europe/Paris \
|
60 |
PORT=3000
|
@@ -77,6 +80,7 @@ RUN --mount=type=secret,id=MONGODB_URL,mode=0444 \
|
|
77 |
&& MODEL_PARAMS="${MODEL_PARAMS:="$(cat /defaults/MODEL_PARAMS)"}" && export MODEL_PARAMS \
|
78 |
&& MODEL_PROMPT_TEMPLATE="${MODEL_PROMPT_TEMPLATE:="$(cat /defaults/MODEL_PROMPT_TEMPLATE)"}" && export MODEL_PROMPT_TEMPLATE \
|
79 |
&& APP_COLOR="${APP_COLOR:="$(cat /defaults/APP_COLOR)"}" && export APP_COLOR \
|
|
|
80 |
&& APP_NAME="${APP_NAME:="$(cat /defaults/APP_NAME)"}" && export APP_NAME \
|
81 |
&& MONGODB_URL=$(cat /run/secrets/MONGODB_URL > /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL && \
|
82 |
envsubst < "entrypoint.sh.template" > "entrypoint.sh" \
|
@@ -123,4 +127,3 @@ COPY --from=chatui-builder --chown=1000 /app/chat-ui/build /app/build
|
|
123 |
ENTRYPOINT ["/bin/bash"]
|
124 |
CMD ["entrypoint.sh"]
|
125 |
|
126 |
-
|
|
|
3 |
ARG MODEL_PROMPT_TEMPLATE
|
4 |
ARG APP_COLOR
|
5 |
ARG APP_NAME
|
6 |
+
ARG INCLUDE_DB
|
7 |
|
8 |
|
9 |
FROM node:20 as chatui-builder
|
|
|
12 |
ARG APP_COLOR
|
13 |
ARG APP_NAME
|
14 |
ARG MODEL_PROMPT_TEMPLATE
|
15 |
+
ARG INCLUDE_DB
|
16 |
|
17 |
WORKDIR /app
|
18 |
|
|
|
20 |
git gettext && \
|
21 |
rm -rf /var/lib/apt/lists/*
|
22 |
|
|
|
23 |
RUN git clone https://github.com/huggingface/chat-ui.git
|
24 |
|
25 |
WORKDIR /app/chat-ui
|
|
|
35 |
&& MODEL_PARAMS="${MODEL_PARAMS:="$(cat /defaults/MODEL_PARAMS)"}" && export MODEL_PARAMS \
|
36 |
&& MODEL_PROMPT_TEMPLATE="${MODEL_PROMPT_TEMPLATE:="$(cat /defaults/MODEL_PROMPT_TEMPLATE)"}" && export MODEL_PROMPT_TEMPLATE \
|
37 |
&& APP_COLOR="${APP_COLOR:="$(cat /defaults/APP_COLOR)"}" && export APP_COLOR \
|
38 |
+
&& INCLUDE_DB="${INCLUDE_DB:="$(cat /defaults/INCLUDE_DB)"}" && export INCLUDE_DB \
|
39 |
&& APP_NAME="${APP_NAME:="$(cat /defaults/APP_NAME)"}" && export APP_NAME \
|
40 |
&& MONGODB_URL=$(cat /run/secrets/MONGODB_URL > /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL && \
|
41 |
echo "${MONGODB_URL}" && \
|
|
|
57 |
ARG MODEL_PROMPT_TEMPLATE
|
58 |
ARG APP_COLOR
|
59 |
ARG APP_NAME
|
60 |
+
ARG INCLUDE_DB
|
61 |
|
62 |
ENV TZ=Europe/Paris \
|
63 |
PORT=3000
|
|
|
80 |
&& MODEL_PARAMS="${MODEL_PARAMS:="$(cat /defaults/MODEL_PARAMS)"}" && export MODEL_PARAMS \
|
81 |
&& MODEL_PROMPT_TEMPLATE="${MODEL_PROMPT_TEMPLATE:="$(cat /defaults/MODEL_PROMPT_TEMPLATE)"}" && export MODEL_PROMPT_TEMPLATE \
|
82 |
&& APP_COLOR="${APP_COLOR:="$(cat /defaults/APP_COLOR)"}" && export APP_COLOR \
|
83 |
+
&& INCLUDE_DB="${INCLUDE_DB:="$(cat /defaults/INCLUDE_DB)"}" && export INCLUDE_DB \
|
84 |
&& APP_NAME="${APP_NAME:="$(cat /defaults/APP_NAME)"}" && export APP_NAME \
|
85 |
&& MONGODB_URL=$(cat /run/secrets/MONGODB_URL > /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL && \
|
86 |
envsubst < "entrypoint.sh.template" > "entrypoint.sh" \
|
|
|
127 |
ENTRYPOINT ["/bin/bash"]
|
128 |
CMD ["entrypoint.sh"]
|
129 |
|
|
defaults/INCLUDE_DB
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
true
|