nsarrazin HF staff commited on
Commit
a040483
1 Parent(s): 169eff3

bring back end of dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -35
Dockerfile CHANGED
@@ -32,56 +32,56 @@ RUN --mount=type=secret,id=MODEL_NAME,mode=0444,required=true \
32
 
33
  RUN npm run build
34
 
35
- # FROM ghcr.io/huggingface/text-generation-inference:latest
36
 
37
- # ENV TZ=Europe/Paris \
38
- # PORT=3000
39
 
40
- # RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
41
- # gnupg \
42
- # curl && \
43
- # rm -rf /var/lib/apt/lists/*
44
 
45
- # RUN curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \
46
- # gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg \
47
- # --dearmor
48
 
49
- # RUN echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list
50
 
51
- # RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
52
- # mongodb-org && \
53
- # rm -rf /var/lib/apt/lists/*
54
 
55
- # RUN mkdir -p /data/db
56
- # RUN chown -R 1000:1000 /data
57
 
58
- # RUN curl -fsSL https://deb.nodesource.com/setup_19.x | /bin/bash -
59
 
60
- # RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
61
- # nodejs && \
62
- # rm -rf /var/lib/apt/lists/*
63
 
64
- # RUN mkdir /app
65
- # RUN chown -R 1000:1000 /app
66
 
67
- # RUN useradd -m -u 1000 user
68
 
69
- # Switch to the "user" user
70
- # USER user
71
 
72
- # ENV HOME=/home/user \
73
- # PATH=/home/user/.local/bin:$PATH
74
 
75
- # RUN npm config set prefix /home/user/.local
76
- # RUN npm install -g pm2
77
 
78
- # COPY --from=chatui-builder --chown=1000 /app/chat-ui/node_modules /app/node_modules
79
- # COPY --from=chatui-builder --chown=1000 /app/chat-ui/package.json /app/package.json
80
- # COPY --from=chatui-builder --chown=1000 /app/chat-ui/build /app/build
81
 
82
- # COPY entrypoint.sh entrypoint.sh
83
 
84
- # ENTRYPOINT ["/bin/bash"]
85
- # CMD ["entrypoint.sh"]
86
 
87
 
 
32
 
33
  RUN npm run build
34
 
35
+ FROM ghcr.io/huggingface/text-generation-inference:latest
36
 
37
+ ENV TZ=Europe/Paris \
38
+ PORT=3000
39
 
40
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
41
+ gnupg \
42
+ curl && \
43
+ rm -rf /var/lib/apt/lists/*
44
 
45
+ RUN curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \
46
+ gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg \
47
+ --dearmor
48
 
49
+ RUN echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list
50
 
51
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
52
+ mongodb-org && \
53
+ rm -rf /var/lib/apt/lists/*
54
 
55
+ RUN mkdir -p /data/db
56
+ RUN chown -R 1000:1000 /data
57
 
58
+ RUN curl -fsSL https://deb.nodesource.com/setup_19.x | /bin/bash -
59
 
60
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
61
+ nodejs && \
62
+ rm -rf /var/lib/apt/lists/*
63
 
64
+ RUN mkdir /app
65
+ RUN chown -R 1000:1000 /app
66
 
67
+ RUN useradd -m -u 1000 user
68
 
69
+ Switch to the "user" user
70
+ USER user
71
 
72
+ ENV HOME=/home/user \
73
+ PATH=/home/user/.local/bin:$PATH
74
 
75
+ RUN npm config set prefix /home/user/.local
76
+ RUN npm install -g pm2
77
 
78
+ COPY --from=chatui-builder --chown=1000 /app/chat-ui/node_modules /app/node_modules
79
+ COPY --from=chatui-builder --chown=1000 /app/chat-ui/package.json /app/package.json
80
+ COPY --from=chatui-builder --chown=1000 /app/chat-ui/build /app/build
81
 
82
+ COPY entrypoint.sh entrypoint.sh
83
 
84
+ ENTRYPOINT ["/bin/bash"]
85
+ CMD ["entrypoint.sh"]
86
 
87