forked from Anush008/tokenizers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mike dupont
committed
Jan 14, 2025
1 parent
9b0ff60
commit c7706a2
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM node:23-bookworm-slim AS base | ||
|
||
# Update default packages | ||
RUN apt-get update | ||
|
||
# Get Ubuntu packages | ||
RUN apt-get install -y \ | ||
build-essential \ | ||
curl | ||
|
||
# Update new packages | ||
RUN apt-get update | ||
|
||
# Get Rust | ||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y | ||
|
||
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc | ||
|
||
RUN corepack enable | ||
COPY . /node_modules/fastembed | ||
WORKDIR /node_modules/fastembed | ||
|
||
FROM base AS prod-deps | ||
RUN yarn install | ||
|
||
FROM base AS build | ||
RUN yarn install --frozen-lockfile | ||
|
||
RUN yarn run build | ||
RUN yarn run prepublishOnly | ||
FROM base | ||
COPY --from=prod-deps /node_modules/ /app/node_modules/ | ||
COPY --from=build /node_modules/ /app/node_modules/ |