Spaces:
Running
Running
Jordi Atserias Batalla
commited on
Commit
·
031e99f
1
Parent(s):
96bda7e
fix setup
Browse files- .env.local +4 -1
- Dockerfile +6 -3
- entrypoint.sh +3 -3
.env.local
CHANGED
@@ -43,4 +43,7 @@ MODELS=`[
|
|
43 |
}
|
44 |
]`
|
45 |
|
46 |
-
PUBLIC_APP_NAME="RedTeam Chat Annotation"
|
|
|
|
|
|
|
|
43 |
}
|
44 |
]`
|
45 |
|
46 |
+
PUBLIC_APP_NAME="RedTeam Chat Annotation"
|
47 |
+
OPENID_CONFIG=${OPENID_CONFIG}
|
48 |
+
MESSAGES_BEFORE_LOGIN=0
|
49 |
+
|
Dockerfile
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
FROM ghcr.io/huggingface/chat-ui:
|
|
|
2 |
|
3 |
FROM ghcr.io/huggingface/text-generation-inference:latest AS final
|
4 |
|
@@ -23,13 +24,15 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
|
|
23 |
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | /bin/bash -
|
24 |
|
25 |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
26 |
-
nodejs && \
|
27 |
rm -rf /var/lib/apt/lists/*
|
28 |
|
|
|
29 |
# image setup
|
30 |
RUN useradd -m -u 1000 user
|
31 |
|
32 |
RUN mkdir /app
|
|
|
33 |
RUN chown -R 1000:1000 /app
|
34 |
RUN mkdir /data
|
35 |
RUN chown -R 1000:1000 /data
|
@@ -57,4 +60,4 @@ COPY --chown=1000 entrypoint.sh /app/entrypoint.sh
|
|
57 |
RUN chmod +x /app/entrypoint.sh
|
58 |
|
59 |
# entrypoint
|
60 |
-
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
|
|
1 |
+
FROM ghcr.io/huggingface/chat-ui-db:sha-e33a49c AS base
|
2 |
+
# FROM ghcr.io/huggingface/chat-ui:latest AS base
|
3 |
|
4 |
FROM ghcr.io/huggingface/text-generation-inference:latest AS final
|
5 |
|
|
|
24 |
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | /bin/bash -
|
25 |
|
26 |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
27 |
+
nodejs vim && \
|
28 |
rm -rf /var/lib/apt/lists/*
|
29 |
|
30 |
+
|
31 |
# image setup
|
32 |
RUN useradd -m -u 1000 user
|
33 |
|
34 |
RUN mkdir /app
|
35 |
+
RUN mkdir /app/models
|
36 |
RUN chown -R 1000:1000 /app
|
37 |
RUN mkdir /data
|
38 |
RUN chown -R 1000:1000 /data
|
|
|
60 |
RUN chmod +x /app/entrypoint.sh
|
61 |
|
62 |
# entrypoint
|
63 |
+
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
entrypoint.sh
CHANGED
@@ -8,10 +8,10 @@ find /data/db -name "*.lock" -type f -exec rm -f {} \;
|
|
8 |
mongod &
|
9 |
|
10 |
# Start the text-generation-inference process
|
11 |
-
text-generation-launcher --model-id ${MODEL_NAME} --num-shard 1 --port 8080 --trust-remote-code &
|
12 |
|
13 |
# Wait for text-generation-inference to start
|
14 |
-
curl --retry 60 --retry-delay 10 --retry-connrefused http://127.0.0.1:8080/health
|
15 |
|
16 |
# Start the chat-ui process
|
17 |
dotenv -e /app/.env -c -- node /app/build/index.js -- --host 0.0.0.0 --port 3000
|
@@ -19,4 +19,4 @@ dotenv -e /app/.env -c -- node /app/build/index.js -- --host 0.0.0.0 --port 3000
|
|
19 |
wait -n
|
20 |
|
21 |
# Exit with status of process that exited first
|
22 |
-
exit $?
|
|
|
8 |
mongod &
|
9 |
|
10 |
# Start the text-generation-inference process
|
11 |
+
# text-generation-launcher --model-id ${MODEL_NAME} --num-shard 1 --port 8080 --trust-remote-code &
|
12 |
|
13 |
# Wait for text-generation-inference to start
|
14 |
+
# curl --retry 60 --retry-delay 10 --retry-connrefused http://127.0.0.1:8080/health
|
15 |
|
16 |
# Start the chat-ui process
|
17 |
dotenv -e /app/.env -c -- node /app/build/index.js -- --host 0.0.0.0 --port 3000
|
|
|
19 |
wait -n
|
20 |
|
21 |
# Exit with status of process that exited first
|
22 |
+
exit $?
|