Skip to content

Commit b222d15

Browse files
author
mike dupont
committed
builds locally
1 parent 98a82dc commit b222d15

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

Dockerfile.amd

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM node:23-bookworm-slim AS base
2+
3+
# Update default packages
4+
RUN apt-get update
5+
6+
# Get Ubuntu packages
7+
RUN apt-get install -y \
8+
build-essential \
9+
curl
10+
11+
# Update new packages
12+
RUN apt-get update
13+
RUN apt-get install -y curl git
14+
15+
# Get Rust
16+
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
17+
18+
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
19+
20+
RUN corepack enable
21+
COPY . /node_modules/tokenizers
22+
WORKDIR /node_modules/tokenizers
23+
24+
#FROM base AS prod-deps
25+
RUN yarn install
26+
27+
#FROM base AS build
28+
RUN yarn install --frozen-lockfile
29+
ENV PATH="/root/.cargo/bin:${PATH}"
30+
RUN yarn run build
31+
RUN yarn run prepublishOnly
32+
33+
#FROM base
34+
#COPY --from=prod-deps /node_modules/ /app/node_modules/
35+
#COPY --from=build /node_modules/ /app/node_modules/

build.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
cat Dockerfile.amd | docker buildx build -f - .

0 commit comments

Comments
 (0)