-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathegl_dockerfile
executable file
·77 lines (63 loc) · 2.65 KB
/
egl_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
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
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics,video
USER root
ENV PYOPENGL_PLATFORM egl
# CUDA
RUN mkdir -p /data/tmp \
&& cd /data/tmp \
&& wget -q $GENERIC_REPO_URL/cuda11.2/cuda_11.2.0_460.27.04_linux.run \
&& wget -q $GENERIC_REPO_URL/cuda11.2/cudnn-11.3-linux-x64-v8.2.1.32.tgz \
&& wget -q $GENERIC_REPO_URL/cuda11.2/cuda11.2.bashrc \
&& chmod 755 cuda_11.2.0_460.27.04_linux.run \
&& ./cuda_11.2.0_460.27.04_linux.run --toolkit --silent --samples \
&& ldconfig \
&& tar xf /data/tmp/cudnn-11.3-linux-x64-v8.2.1.32.tgz -C /usr/local \
&& chmod a+r /usr/local/cuda/lib64/libcudnn* \
&& cp /data/tmp/cuda11.2.bashrc ~mqq/ \
&& cp /data/tmp/cuda11.2.bashrc ~/
# runtime
RUN yum install -y \
git \
make \
libtool \
gcc \
pkgconfig \
python2 \
libXext-devel \
libX11-devel \
xorg-x11-proto-devel && \
rm -rf /var/cache/yum/*
WORKDIR /opt/libglvnd
RUN git clone --branch="v1.2.0" https://github.com/NVIDIA/libglvnd.git . && \
./autogen.sh && \
./configure --prefix=/usr/local --libdir=/usr/local/lib64 && \
make -j"$(nproc)" install-strip && \
find /usr/local/lib64 -type f -name 'lib*.la' -delete
RUN git clone --branch centos8 https://gitlab.com/nvidia/container-images/opengl && cd opengl && \
mkdir -p /usr/local/share/glvnd/egl_vendor.d/ && \
cp glvnd/runtime/10_nvidia.json /usr/local/share/glvnd/egl_vendor.d/10_nvidia.json
RUN echo '/usr/local/lib64' >> /etc/ld.so.conf.d/glvnd.conf && \
echo '/usr/local/lib' >> /etc/ld.so.conf.d/glvnd.conf && \
ldconfig && \
echo '/usr/local/$LIB/libGL.so.1' >> /etc/ld.so.preload && \
echo '/usr/local/$LIB/libEGL.so.1' >> /etc/ld.so.preload
# devel
RUN git clone https://github.com/KhronosGroup/OpenGL-Registry.git && cd OpenGL-Registry && \
git checkout 681c365c012ac9d3bcadd67de10af4730eb460e0 && \
cp -r api/GL /usr/local/include
RUN git clone https://github.com/KhronosGroup/EGL-Registry.git && cd EGL-Registry && \
git checkout 0fa0d37da846998aa838ed2b784a340c28dadff3 && \
cp -r api/EGL api/KHR /usr/local/include
RUN git clone --branch=mesa-17.3.3 --depth=1 https://gitlab.freedesktop.org/mesa/mesa.git && cd mesa && \
cp include/GL/gl.h include/GL/gl_mangle.h /usr/local/include/GL/
RUN yum install -y 'dnf-command(config-manager)'
RUN yum install -y \
pkgconfig \
libXau-devel \
libXdmcp-devel \
libxcb-devel \
libXext-devel \
libX11-devel && \
rm -rf /var/cache/yum/*
ENV PKG_CONFIG_PATH /usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig
RUN cd opengl/glvnd/devel && \
cp -r usr /usr