This repository has been archived by the owner on Feb 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.base
46 lines (43 loc) · 1.92 KB
/
Dockerfile.base
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
38
39
40
41
42
43
44
45
46
# force rebuild 1
FROM ubuntu:20.04
ENV \
NODE_ENV=production \
CHROME_BIN=/usr/bin/google-chrome-stable \
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
DEBIAN_FRONTEND=noninteractive
RUN \
apt-get update -y && \
apt-get install -y wget curl unzip fontconfig python3 python3-pip && \
# install nodejs
curl -sL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs && \
npm i -g yarn node-gyp pm2 && \
# install fonts: twemoji mozilla, roboto and noto sans
cd /usr/share/fonts/truetype/ && \
curl -Lo TwemojiMozilla.ttf https://github.com/mozilla/twemoji-colr/releases/download/v0.6.0/TwemojiMozilla.ttf && \
curl -Lo Roboto.zip https://fonts.google.com/download?family=Roboto && \
curl -Lo Roboto_Condensed.zip https://fonts.google.com/download?family=Roboto%20Condensed && \
curl -Lo Noto_Sans.zip https://fonts.google.com/download?family=Noto%20Sans && \
# these are otf but its okay they're in truetype/
curl -Lo Noto_Sans_JP.zip https://fonts.google.com/download?family=Noto%20Sans%20JP && \
curl -Lo Noto_Sans_KR.zip https://fonts.google.com/download?family=Noto%20Sans%20KR && \
curl -Lo Noto_Sans_TC.zip https://fonts.google.com/download?family=Noto%20Sans%20TC && \
curl -Lo Noto_Sans_SC.zip https://fonts.google.com/download?family=Noto%20Sans%20SC && \
curl -Lo Noto_Sans_HK.zip https://fonts.google.com/download?family=Noto%20Sans%20HK && \
# unzip and cache
unzip -o Roboto.zip && \
unzip -o Roboto_Condensed.zip && \
unzip -o Noto_Sans.zip && \
unzip -o Noto_Sans_JP.zip && \
unzip -o Noto_Sans_KR.zip && \
unzip -o Noto_Sans_TC.zip && \
unzip -o Noto_Sans_SC.zip && \
unzip -o Noto_Sans_HK.zip && \
rm -rf *.txt *.zip && \
fc-cache -fv && \
# install google chrome
curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
apt-get install -y ./google-chrome-stable_current_amd64.deb && \
rm -f google-chrome-stable_current_amd64.deb && \
# install python transformers
pip3 install transformers