0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-07 00:50:23 -05:00
immich/machine-learning/Dockerfile

43 lines
743 B
Text
Raw Normal View History

2022-10-27 17:21:28 -05:00
FROM node:16-bullseye-slim as builder
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /usr/src/app
2022-10-27 17:21:28 -05:00
RUN apt-get update
RUN apt-get install gcc g++ make cmake python3 python3-pip ffmpeg -y
COPY package.json package-lock.json ./
RUN npm ci
RUN npm rebuild @tensorflow/tfjs-node --build-from-source
COPY . .
2022-11-10 23:22:17 -05:00
FROM builder as prod
RUN npm run build
2022-11-10 23:22:17 -05:00
RUN npm prune --omit=dev
FROM node:16-bullseye-slim
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /usr/src/app
RUN apt-get update \
2022-10-27 17:21:28 -05:00
&& apt-get install -y ffmpeg \
&& rm -rf /var/cache/apt/lists
2022-11-10 23:22:17 -05:00
COPY --from=prod /usr/src/app/node_modules ./node_modules
COPY --from=prod /usr/src/app/dist ./dist
COPY package.json package-lock.json ./
COPY entrypoint.sh ./
# CMD [ "node", "dist/main" ]