Skip to content

Commit

Permalink
Fix tiktokenizer initialization in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcampagnolitg committed Dec 9, 2024
1 parent 4f33fd9 commit 9026faa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ COPY .husky/install.mjs .husky/install.mjs

COPY package*.json ./
RUN npm ci
# Download the tiktokenizer model which is written to node_modules/@microsoft/tiktokenizer/model
# Need to do this as the root user as sophia user can't write to node_modules
RUN npm run initTiktokenizer

COPY . .

Expand All @@ -30,8 +33,6 @@ USER $user
RUN mkdir .sophia
# Generate the function schemas
RUN npm run functionSchemas
# Download the tiktokenizer model
RUN npm run initTiktokenizer

ENV NODE_ENV=production
ENV PORT=8080
Expand Down

0 comments on commit 9026faa

Please sign in to comment.