-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (26 loc) · 903 Bytes
/
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
35
36
37
# build front-end
FROM node:lts-alpine AS builder
COPY ./ /app
WORKDIR /app
RUN yarn install && yarn run build
# setup environment
FROM python:3.9-slim
RUN apt-get update && apt-get install -y git wget curl unzip
RUN git clone https://github.com/KichangKim/DeepDanbooru.git
WORKDIR /DeepDanbooru
RUN pip3 install --upgrade pip && \
pip3 install -r requirements.txt && \
pip3 install .
RUN wget https://github.com/KichangKim/DeepDanbooru/releases/download/v3-20211112-sgd-e28/deepdanbooru-v3-20211112-sgd-e28.zip && \
unzip deepdanbooru-v3-20211112-sgd-e28.zip -d /pretrained && \
rm deepdanbooru-v3-20211112-sgd-e28.zip
# run server
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs
RUN npm install yarn -g
COPY /server /app
COPY --from=builder /app/build /app/public
WORKDIR /app
RUN yarn install
EXPOSE 7500
CMD ["yarn", "start"]