File size: 1,079 Bytes
e38d6b8
cbdbe9c
 
 
1532035
85b8a2a
fa15b2d
1532035
 
66ae5e0
 
 
 
 
c71ec0b
ce4023a
 
0e9b05e
c8af8f9
cbdbe9c
 
 
 
fa15b2d
cbdbe9c
464198b
c8af8f9
cbdbe9c
 
 
 
 
c5de692
c35223d
cbdbe9c
 
 
c5de692
c35223d
4d18a04
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM node:18

WORKDIR /usr/src/app/

RUN npm install typescript pnpm -g

RUN git clone -b feat/agent_chat_react https://github.com/huggingface/huggingface.js.git && \
    cd huggingface.js && \
    pnpm install && \
    cd packages/inference && \
    pnpm install && \
    pnpm run build && \
    npm link && \
    cd ../.. && \
    cd packages/agents && \
    rm -rf node_modules && \
    npm install && \
    npm link @huggingface/inference && \
    npm run build && \
    npm link && \
    cd ../../..


RUN git clone -b feature/chat-agent https://github.com/nsarrazin/poc-agents.js.git && \
    cd poc-agents.js && \
    git checkout e9e274ae0f0eceb6958da7dc8bfe6cc920eefee7 && \
    rm package-lock.json && \
    npm install && \
    npm link @huggingface/agents

WORKDIR /usr/src/app/poc-agents.js

RUN chmod -R 755 /usr/src/app/poc-agents.js

RUN --mount=type=secret,id=DOTENV_LOCAL,dst=.env.local \
    npm run build 

RUN chmod -R 755 /usr/src/app/poc-agents.js

RUN npm install -g pm2

CMD pm2 start /usr/src/app/poc-agents.js/build/index.js -i $CPU_CORES --no-daemon