1
+ #
2
+ # thomasweise/docker-texlive-full
3
+ #
4
+ # This is an image with a full TeX Live installation and several
5
+ # fonts and tools.
6
+ # Source: http://github.com/thomasWeise/docker-texlive-full/
7
+ # License: GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007
8
+ # The license applies to the way the image is built, while the
9
+ # software components inside the image are under the respective
10
+ # licenses chosen by their respective copyright holders.
11
+ #
12
+ FROM ubuntu:20.04
13
+ MAINTAINER Thomas Weise <
[email protected] >
14
+
15
+ ENV LANG=C.UTF-8
16
+ ENV DEBIAN_FRONTEND=noninteractive
17
+
18
+ RUN apt-get update &&\
19
+ # prevent doc and man pages from being installed
20
+ # the idea is based on https://askubuntu.com/questions/129566
21
+ printf 'path-exclude /usr/share/doc/*\n path-include /usr/share/doc/*/copyright\n path-exclude /usr/share/man/*\n path-exclude /usr/share/groff/*\n path-exclude /usr/share/info/*\n path-exclude /usr/share/lintian/*\n path-exclude /usr/share/linda/*\n path-exclude=/usr/share/locale/*' > /etc/dpkg/dpkg.cfg.d/01_nodoc &&\
22
+ # remove doc files and man pages already installed
23
+ rm -rf /usr/share/groff/* /usr/share/info/* &&\
24
+ rm -rf /usr/share/lintian/* /usr/share/linda/* /var/cache/man/* &&\
25
+ rm -rf /usr/share/man &&\
26
+ mkdir -p /usr/share/man &&\
27
+ find /usr/share/doc -depth -type f ! -name copyright -delete &&\
28
+ find /usr/share/doc -type f -name "*.pdf" -delete &&\
29
+ find /usr/share/doc -type f -name "*.gz" -delete &&\
30
+ find /usr/share/doc -type f -name "*.tex" -delete &&\
31
+ find /usr/share/doc -type d -empty -delete || true &&\
32
+ mkdir -p /usr/share/doc &&\
33
+ mkdir -p /usr/share/info &&\
34
+ # install utilities
35
+ apt-get install -f -y --no-install-recommends apt-utils &&\
36
+ # get and update certificates, to hopefully resolve mscorefonts error
37
+ apt-get install -f -y --no-install-recommends ca-certificates &&\
38
+ update-ca-certificates &&\
39
+ # install some utilitites and nice fonts, e.g., for chinese and other
40
+ apt-get install -f -y --no-install-recommends \
41
+ curl \
42
+ emacs-intl-fonts \
43
+ fontconfig \
44
+ fonts-arphic-bkai00mp \
45
+ fonts-arphic-bsmi00lp \
46
+ fonts-arphic-gbsn00lp \
47
+ fonts-arphic-gkai00mp \
48
+ fonts-arphic-ukai \
49
+ fonts-arphic-uming \
50
+ fonts-dejavu \
51
+ fonts-dejavu-core \
52
+ fonts-dejavu-extra \
53
+ fonts-droid-fallback \
54
+ fonts-guru \
55
+ fonts-guru-extra \
56
+ fonts-liberation \
57
+ fonts-noto-cjk \
58
+ fonts-opensymbol \
59
+ fonts-roboto \
60
+ fonts-roboto-hinted \
61
+ fonts-stix \
62
+ fonts-symbola \
63
+ fonts-texgyre \
64
+ fonts-unfonts-core \
65
+ ttf-wqy-microhei \
66
+ ttf-wqy-zenhei \
67
+ xfonts-intl-chinese \
68
+ xfonts-intl-chinese-big \
69
+ xfonts-wqy &&\
70
+ # now the microsoft core fonts
71
+ echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections &&\
72
+ echo "ttf-mscorefonts-installer msttcorefonts/present-mscorefonts-eula note" | debconf-set-selections &&\
73
+ curl --output "/tmp/ttf-mscorefonts-installer.deb" "http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.7_all.deb" &&\
74
+ apt install -f -y --no-install-recommends "/tmp/ttf-mscorefonts-installer.deb" || true &&\
75
+ rm -f "/tmp/ttf-mscorefonts-installer.deb" &&\
76
+ # we make sure to contain the EULA in our container
77
+ curl --output "/root/mscorefonts-eula" "http://corefonts.sourceforge.net/eula.htm" &&\
78
+ # install TeX Live and ghostscript as well as other tools
79
+ apt-get install -f -y --no-install-recommends \
80
+ cm-super \
81
+ dvipng \
82
+ ghostscript \
83
+ make \
84
+ latex-cjk-all \
85
+ latex-cjk-common \
86
+ latex-cjk-chinese \
87
+ latexmk \
88
+ lcdf-typetools \
89
+ lmodern \
90
+ poppler-utils \
91
+ psutils \
92
+ purifyeps \
93
+ t1utils \
94
+ tex-gyre \
95
+ tex4ht \
96
+ texlive-base \
97
+ texlive-bibtex-extra \
98
+ texlive-binaries \
99
+ texlive-extra-utils \
100
+ texlive-font-utils \
101
+ texlive-fonts-extra \
102
+ texlive-fonts-extra-links \
103
+ texlive-fonts-recommended \
104
+ texlive-formats-extra \
105
+ texlive-lang-all \
106
+ texlive-lang-chinese \
107
+ texlive-lang-cjk \
108
+ texlive-latex-base \
109
+ texlive-latex-extra \
110
+ texlive-latex-recommended \
111
+ texlive-luatex \
112
+ texlive-metapost \
113
+ texlive-pictures \
114
+ texlive-plain-generic \
115
+ texlive-pstricks \
116
+ texlive-publishers \
117
+ texlive-science \
118
+ texlive-xetex \
119
+ texlive-bibtex-extra &&\
120
+ # delete texlive sources and other potentially useless stuff
121
+ rm -rf /usr/share/texmf/source || true &&\
122
+ rm -rf /usr/share/texlive/texmf-dist/source || true &&\
123
+ find /usr/share/texlive -type f -name "readme*.*" -delete &&\
124
+ find /usr/share/texlive -type f -name "README*.*" -delete &&\
125
+ rm -rf /usr/share/texlive/release-texlive.txt || true &&\
126
+ rm -rf /usr/share/texlive/doc.html || true &&\
127
+ rm -rf /usr/share/texlive/index.html || true &&\
128
+ # update font cache
129
+ fc-cache -fv &&\
130
+ # clean up all temporary files
131
+ apt-get clean -y &&\
132
+ rm -rf /var/lib/apt/lists/* &&\
133
+ rm -f /etc/ssh/ssh_host_* &&\
134
+ # delete man pages and documentation
135
+ rm -rf /usr/share/man &&\
136
+ mkdir -p /usr/share/man &&\
137
+ find /usr/share/doc -depth -type f ! -name copyright -delete &&\
138
+ find /usr/share/doc -type f -name "*.pdf" -delete &&\
139
+ find /usr/share/doc -type f -name "*.gz" -delete &&\
140
+ find /usr/share/doc -type f -name "*.tex" -delete &&\
141
+ find /usr/share/doc -type d -empty -delete || true &&\
142
+ mkdir -p /usr/share/doc &&\
143
+ rm -rf /var/cache/apt/archives &&\
144
+ mkdir -p /var/cache/apt/archives &&\
145
+ rm -rf /tmp/* /var/tmp/* &&\
146
+ find /usr/share/ -type f -empty -delete || true &&\
147
+ find /usr/share/ -type d -empty -delete || true &&\
148
+ mkdir -p /usr/share/texmf/source &&\
149
+ mkdir -p /usr/share/texlive/texmf-dist/source
150
+
151
+ ADD scripts /bin/
152
+
153
+ ARG CODE_SERVER_VERSION=2.1698-vsc1.41.1-linux-x86_64
154
+ COPY ./code-server${CODE_SERVER_VERSION}.tar.gz /tmp/code-server.tar.gz
155
+ RUN tar xvzpf /tmp/code-server.tar.gz -C /tmp/
156
+ RUN mv /tmp/code-server${CODE_SERVER_VERSION}/code-server /usr/local/bin/code-server
157
+
158
+ # Backend.AI specifics
159
+ LABEL ai.backend.kernelspec="1" \
160
+ ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
161
+ ai.backend.features="batch query uid-match user-input" \
162
+ ai.backend.resource.min.cpu="1" \
163
+ ai.backend.resource.min.mem="1g" \
164
+ ai.backend.base-distro="ubuntu16.04" \
165
+ ai.backend.runtime-type="python" \
166
+ ai.backend.runtime-path="/usr/bin/python3" \
167
+ ai.backend.service-ports="vscode:http:8080"
168
+ COPY policy.yml /etc/backend.ai/jail/policy.yml
0 commit comments