HackPig520 commited on
Commit
0f1ecfd
·
verified ·
1 Parent(s): a990daa

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -51
Dockerfile CHANGED
@@ -1,57 +1,8 @@
1
- FROM ghcr.io/huggingface/chat-ui:latest AS base
2
 
3
- FROM ghcr.io/huggingface/text-generation-inference:latest AS final
4
-
5
- ARG MODEL_NAME
6
- ENV MODEL_NAME=${MODEL_NAME}
7
-
8
- ENV TZ=Europe/Paris \
9
  PORT=3000
10
 
11
- # mongo installation
12
- RUN curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
13
- gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
14
- --dearmor
15
-
16
- RUN echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list
17
-
18
- RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
19
- mongodb-org && \
20
- rm -rf /var/lib/apt/lists/*
21
-
22
- # node installation
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
36
-
37
- # Switch to the "user" user
38
- USER user
39
-
40
- ENV HOME=/home/user \
41
- PATH=/home/user/.local/bin:$PATH
42
-
43
- RUN npm config set prefix /home/user/.local
44
- RUN npm install -g dotenv-cli
45
-
46
-
47
- # copy chat-ui from base image
48
- COPY --from=base --chown=1000 /app/node_modules /app/node_modules
49
- COPY --from=base --chown=1000 /app/package.json /app/package.json
50
- COPY --from=base --chown=1000 /app/build /app/build
51
-
52
- COPY --from=base --chown=1000 /app/.env /app/.env
53
- COPY --chown=1000 .env.local /app/.env.local
54
-
55
  COPY --chown=1000 entrypoint.sh /app/entrypoint.sh
56
 
57
  RUN chmod +x /app/entrypoint.sh
 
1
+ FROM ghcr.io/huggingface/chat-ui:latest AS final
2
 
3
+ ENV TZ=Asia/Shanghai \
 
 
 
 
 
4
  PORT=3000
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  COPY --chown=1000 entrypoint.sh /app/entrypoint.sh
7
 
8
  RUN chmod +x /app/entrypoint.sh