Spaces:
Running
on
A10G
Running
on
A10G
fixing standalone template
Browse files- Dockerfile +15 -18
Dockerfile
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
FROM node:19 as chatui-builder
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
WORKDIR /app
|
4 |
|
5 |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
@@ -17,16 +22,12 @@ COPY .env.local.template .env.local.template
|
|
17 |
RUN mkdir defaults
|
18 |
ADD defaults /defaults
|
19 |
RUN chmod -R 777 /defaults
|
20 |
-
RUN --mount=type=secret,id=
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
MODEL_NAME=$(cat /run/secrets/MODEL_NAME 2> /dev/null | grep '^' || cat /defaults/MODEL_NAME) && export MODEL_NAME \
|
26 |
-
&& MODEL_PARAMS=$(cat /run/secrets/MODEL_PARAMS 2> /dev/null | grep '^' ||cat /defaults/MODEL_PARAMS) && export MODEL_PARAMS \
|
27 |
&& MONGODB_URL=$(cat /run/secrets/MONGODB_URL 2> /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL \
|
28 |
-
&& APP_COLOR=$(cat /run/secrets/APP_COLOR 2> /dev/null | grep '^' || cat /defaults/APP_COLOR) && export APP_COLOR \
|
29 |
-
&& APP_NAME=$(cat /run/secrets/APP_NAME 2> /dev/null | grep '^' || cat /defaults/APP_NAME) && export APP_NAME \
|
30 |
&& envsubst < ".env.local.template" > ".env.local" \
|
31 |
&& rm .env.local.template
|
32 |
|
@@ -55,16 +56,12 @@ COPY entrypoint.sh.template entrypoint.sh.template
|
|
55 |
RUN mkdir defaults
|
56 |
ADD defaults /defaults
|
57 |
RUN chmod -R 777 /defaults
|
58 |
-
RUN --mount=type=secret,id=
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
MODEL_NAME=$(cat /run/secrets/MODEL_NAME 2> /dev/null | grep '^' || cat /defaults/MODEL_NAME) && export MODEL_NAME \
|
64 |
-
&& MODEL_PARAMS=$(cat /run/secrets/MODEL_PARAMS 2> /dev/null | grep '^' ||cat /defaults/MODEL_PARAMS) && export MODEL_PARAMS \
|
65 |
&& MONGODB_URL=$(cat /run/secrets/MONGODB_URL 2> /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL \
|
66 |
-
&& APP_COLOR=$(cat /run/secrets/APP_COLOR 2> /dev/null | grep '^' || cat /defaults/APP_COLOR) && export APP_COLOR \
|
67 |
-
&& APP_NAME=$(cat /run/secrets/APP_NAME 2> /dev/null | grep '^' || cat /defaults/APP_NAME) && export APP_NAME \
|
68 |
&& envsubst < "entrypoint.sh.template" > "entrypoint.sh" \
|
69 |
&& rm entrypoint.sh.template
|
70 |
|
|
|
1 |
FROM node:19 as chatui-builder
|
2 |
|
3 |
+
ARG MODEL_NAME
|
4 |
+
ARG MODEL_PARAMS
|
5 |
+
ARG APP_COLOR
|
6 |
+
ARG APP_NAME
|
7 |
+
|
8 |
WORKDIR /app
|
9 |
|
10 |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
|
22 |
RUN mkdir defaults
|
23 |
ADD defaults /defaults
|
24 |
RUN chmod -R 777 /defaults
|
25 |
+
RUN --mount=type=secret,id=MONGODB_URL,mode=0444 \
|
26 |
+
"${MODEL_NAME:="${cat /defaults/MODEL_NAME}"}" && export MODEL_NAME \
|
27 |
+
"${MODEL_PARAMS:="${cat /defaults/MODEL_PARAMS}"}" && export MODEL_PARAMS \
|
28 |
+
"${APP_COLOR:="${cat /defaults/APP_COLOR}"}" && export APP_COLOR \
|
29 |
+
"${APP_NAME:="${cat /defaults/APP_NAME}"}" && export APP_NAME \
|
|
|
|
|
30 |
&& MONGODB_URL=$(cat /run/secrets/MONGODB_URL 2> /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL \
|
|
|
|
|
31 |
&& envsubst < ".env.local.template" > ".env.local" \
|
32 |
&& rm .env.local.template
|
33 |
|
|
|
56 |
RUN mkdir defaults
|
57 |
ADD defaults /defaults
|
58 |
RUN chmod -R 777 /defaults
|
59 |
+
RUN --mount=type=secret,id=MONGODB_URL,mode=0444 \
|
60 |
+
"${MODEL_NAME:="${cat /defaults/MODEL_NAME}"}" && export MODEL_NAME \
|
61 |
+
"${MODEL_PARAMS:="${cat /defaults/MODEL_PARAMS}"}" && export MODEL_PARAMS \
|
62 |
+
"${APP_COLOR:="${cat /defaults/APP_COLOR}"}" && export APP_COLOR \
|
63 |
+
"${APP_NAME:="${cat /defaults/APP_NAME}"}" && export APP_NAME \
|
|
|
|
|
64 |
&& MONGODB_URL=$(cat /run/secrets/MONGODB_URL 2> /dev/null | grep '^' || cat /defaults/MONGODB_URL) && export MONGODB_URL \
|
|
|
|
|
65 |
&& envsubst < "entrypoint.sh.template" > "entrypoint.sh" \
|
66 |
&& rm entrypoint.sh.template
|
67 |
|