@@ -7,10 +7,12 @@ ENV DEBIAN_FRONTEND=noninteractive
77RUN apt-get -o Acquire::Check-Valid-Until=false -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update
88
99# make g++ gcc build-essential are needed for node-gyp
10- RUN apt-get install -y curl make g++ gcc build-essential git
11- RUN curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
12- RUN bash ./nodesource_setup.sh
13- RUN apt-get install -y nodejs
10+ RUN apt-get install -y curl make g++ gcc build-essential git && \
11+ curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh && \
12+ bash ./nodesource_setup.sh && \
13+ apt-get install -y nodejs && \
14+ rm nodesource_setup.sh && \
15+ npm install -g pnpm
1416
1517ENV user=typedai
1618ENV homedir=/home/typedai/
@@ -22,19 +24,19 @@ RUN mkdir ".husky"
2224COPY .husky/install.mjs .husky/install.mjs
2325
2426COPY package*.json ./
25- RUN npm ci
27+ RUN pnpm install
2628
2729COPY . .
2830
2931# Download the tiktokenizer model, which is written to node_modules/@microsoft/tiktokenizer/model,
3032# as the root user, as the typedai user can't write to node_modules
31- RUN npm run initTiktokenizer
33+ RUN pnpm run initTiktokenizer
3234
3335USER $user
3436
3537RUN mkdir .typedai
3638# Generate the function schemas
37- RUN npm run functionSchemas
39+ RUN pnpm run functionSchemas
3840
3941# Needed to avoid the error "fatal: detected dubious ownership in repository at '/home/typedai'" when running git commands
4042# as the application files are owned by the root user so an agent (which runs as the typedai user) can't modify them.
@@ -43,4 +45,4 @@ RUN git config --global --add safe.directory /home/typedai
4345ENV NODE_ENV=production
4446ENV PORT=8080
4547EXPOSE 8080
46- CMD [ "npm " , "run" , "start" ]
48+ CMD [ "pnpm " , "run" , "start" ]
0 commit comments