File: Dockerfile

package info (click to toggle)
virglrenderer 0.8.2-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 58,348 kB
  • sloc: ansic: 46,856; sh: 1,062; python: 460; makefile: 274
file content (187 lines) | stat: -rw-r--r-- 6,212 bytes parent folder | download
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
FROM debian:buster-slim

ENV DEBIAN_FRONTEND=noninteractive
ENV GOPATH=/usr/local/go
ENV PATH=$PATH:/usr/local/go/bin
ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/local/lib/x86_64-linux-gnu
ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig:/usr/local/lib/x86_64-linux-gnu/pkgconfig
ENV LDFLAGS="-L/usr/local/lib64 -L/usr/local/lib/ -L/usr/local/lib/x86_64-linux-gnu"
ENV CC="gcc-8"
ENV CXX="g++-8"
ENV CFLAGS="-g3"
ENV CXXFLAGS="-g3"
ENV GIT_DATE="`date +%Y-%m-%d -d \"15 months ago\"`"
ENV MESA_DEBUG=1


RUN echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft
RUN echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft
RUN echo '#!/bin/sh' > /usr/sbin/policy-rc.d
RUN echo 'exit 101' >> /usr/sbin/policy-rc.d
RUN chmod +x /usr/sbin/policy-rc.d

RUN echo deb-src http://deb.debian.org/debian buster main >> /etc/apt/sources.list
RUN echo deb http://deb.debian.org/debian buster-backports main >> /etc/apt/sources.list
RUN apt-get update && \
    apt-get -y install ca-certificates && \
    apt-get -y install --no-install-recommends \
      autoconf \
      busybox \
      ccache \
      check \
      clang-8 \
      cmake \
      dbus \
      g++-8 \
      gcc-8 \
      gdb \
      gdc-8 \
      git \
      golang-go \
      kbd \
      libcurl4-openssl-dev \
      libgbm-dev \
      libnss-systemd \
      libpng-dev \
      libxrandr-dev \
      libxvmc-dev \
      libsm-dev \
      libwayland-dev \
      libwayland-egl-backend-dev \
      linux-image-amd64 \
      lld-8 \
      llvm-8-dev \
      mesa-utils \
      nasm \
      ninja-build \
      procps \
      psmisc \
      python-numpy \
      python-six \
      python-mako \
      python3-pip \
      python3-setuptools \
      python3-six \
      python3-wheel \
      qemu \
      spirv-headers \
      strace \
      systemd \
      systemd-coredump \
      time \
      waffle-utils \
      wget \
      xinit \
      xserver-xorg-core \
      xterm \
      xvfb \
      zlib1g-dev && \
    apt-get -y build-dep --no-install-recommends \
      libepoxy-dev \
      libdrm \
      mesa \
      piglit \
      virglrenderer && \
    apt-get -y remove valgrind && \
    rm -rf /var/lib/apt/lists/*

RUN pip3 install meson

ARG KNOWN_GOOD_FAKEMACHINE=c4752ddf3343
RUN go get -v github.com/tomeuv/fakemachine/cmd/fakemachine
RUN go install -x github.com/tomeuv/fakemachine/cmd/fakemachine

ENV BATTERY_VERSION=0.1.23
WORKDIR /battery
RUN wget "https://github.com/VoltLang/Battery/releases/download/v${BATTERY_VERSION}/battery-${BATTERY_VERSION}-x86_64-linux.tar.gz" && \
    tar xzvf battery-${BATTERY_VERSION}-x86_64-linux.tar.gz && \
    rm battery-${BATTERY_VERSION}-x86_64-linux.tar.gz && \
    mv battery /usr/local/bin
WORKDIR /

WORKDIR /volt
RUN git clone --depth=1 https://github.com/VoltLang/Watt.git && \
    git clone --depth=1 https://github.com/VoltLang/Volta.git && \
    git clone --depth=1 https://github.com/Wallbraker/dEQP.git && \
    battery config --release --lto Volta Watt && \
    battery build && \
    battery config --cmd-volta Volta/volta Volta/rt Watt dEQP && \
    battery build && \
    cp dEQP/deqp /usr/local/bin && \
    rm -rf /volt
WORKDIR /

# To avoid this error:
# error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
RUN git config --global http.postBuffer 1048576000

ARG KNOWN_GOOD_CTS
ENV KNOWN_GOOD_CTS ${KNOWN_GOOD_CTS:-6c709dc9a99b70572aceb0f7698ab044383ff948}
WORKDIR /VK-GL-CTS
RUN git clone --shallow-since="$GIT_DATE" https://github.com/KhronosGroup/VK-GL-CTS.git . && \
    git checkout ${KNOWN_GOOD_CTS} && \
    git log --oneline -n 1 && \
    python3 external/fetch_sources.py && \
    mkdir -p build && \
    cd build && \
    cmake -DDEQP_TARGET=x11_egl_glx -DCMAKE_BUILD_TYPE=Release .. && \
    make -j$(nproc) && \
    find . -name CMakeFiles | xargs rm -rf && \
    find . -name lib\*.a | xargs rm -rf
WORKDIR /

ARG KNOWN_GOOD_PIGLIT
ENV KNOWN_GOOD_PIGLIT ${KNOWN_GOOD_PIGLIT:-603cfb97542a411e8957a0d689d8b28cf8b9ef4d}
WORKDIR /piglit
RUN git clone --shallow-since="$GIT_DATE" https://gitlab.freedesktop.org/mesa/piglit.git . && \
    git checkout ${KNOWN_GOOD_PIGLIT} && \
    git log --oneline -n 1 && \
    cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release . && \
    make -j$(nproc) install >/dev/null && \
    rm -rf /usr/local/lib/piglit/generated_tests/spec/arb_vertex_attrib_64bit && \
    rm -rf /usr/local/lib/piglit/generated_tests/spec/glsl-4.20 && \
    rm -rf /piglit
WORKDIR /

ARG KNOWN_GOOD_EPOXY
ENV KNOWN_GOOD_EPOXY ${KNOWN_GOOD_EPOXY:-5d818164dd2ab87b0054641f1446bc552a602320}
WORKDIR /epoxy
RUN git clone --shallow-since="$GIT_DATE" https://github.com/anholt/libepoxy.git . && \
    git checkout ${KNOWN_GOOD_EPOXY} && \
    git log --oneline -n 1 && \
    mkdir -p build && \
    meson build/ && \
    meson configure build/ -Dprefix=/usr/local -Dlibdir=lib && \
    ninja -C build/ install >/dev/null && \
    rm -rf /epoxy
WORKDIR /

ARG KNOWN_GOOD_DRM=libdrm-2.4.100
WORKDIR /drm
RUN git clone --shallow-since="$GIT_DATE" https://gitlab.freedesktop.org/mesa/drm.git . && \
    git checkout ${KNOWN_GOOD_DRM} && \
    git log --oneline -n 1 && \
    mkdir -p build && \
    meson build/ && \
    meson configure build/ -Dprefix=/usr/local -Dlibdir=lib && \
    ninja -C build/ install >/dev/null && \
    rm -rf /drm
WORKDIR /

ARG KNOWN_GOOD_MESA
ENV KNOWN_GOOD_MESA ${KNOWN_GOOD_MESA:-2c5eb1df681e28c23e24219eab803b6d4da5aa38}
RUN echo $KNOWN_GOOD_MESA
ARG MESA_REPO
ENV MESA_REPO ${MESA_REPO:-https://gitlab.freedesktop.org/mesa/mesa.git}
RUN echo $MESA_REPO
WORKDIR /mesa
RUN git clone --shallow-since="$GIT_DATE" ${MESA_REPO} . && \
    git checkout ${KNOWN_GOOD_MESA} && \
    git log --oneline -n 1 && \
    mkdir -p build && \
    meson build/ && \
    meson configure build/ -Dprefix=/usr/local -Dplatforms=drm,x11,wayland,surfaceless -Ddri-drivers=i965 -Dgallium-drivers=swrast,virgl,radeonsi -Dbuildtype=debugoptimized -Dllvm=true -Dglx=dri -Dgallium-vdpau=false -Dgallium-va=false -Dvulkan-drivers=[] -Dlibdir=lib && \
    ninja -C build/ install >/dev/null && \
    rm -rf /mesa
WORKDIR /