forked from harsh4870/face-detection-tensorjs
-
Notifications
You must be signed in to change notification settings - Fork 5
/
slim-dockerfile
34 lines (32 loc) · 904 Bytes
/
slim-dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM python:3.6-slim as base
RUN apt-get update && apt-get install -y --fix-missing --no-install-recommends \
build-essential \
libpq-dev \
curl \
git-core \
iputils-ping \
pkg-config \
rsync \
software-properties-common \
unzip \
wget
RUN apt-get autoremove -y && apt-get clean && \
rm -rf /usr/local/src/*
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*
FROM base as builder
ENV NODE_ENV=development
WORKDIR "/build"
RUN curl --silent --location https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install --yes nodejs
RUN npm install -g yarn
RUN yarn add @tensorflow/tfjs
RUN yarn add @tensorflow/tfjs-node
COPY package.json .
RUN npm install --force
FROM node:lts-alpine3.18 as runner
WORKDIR "/app"
COPY --from=builder /build/node_modules /app/node_modules
COPY . .
EXPOSE 1234
CMD ["yarn", "watch"]