-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_nvidia
67 lines (57 loc) · 2.12 KB
/
Dockerfile_nvidia
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
ARG IMAGE=ubuntu20.04
FROM ${IMAGE}
ENV DEBIAN_FRONTEND="noninteractive"
ARG CUDA=10.2
ARG L4T_RELEASE=r32.6
ARG SOC=t194
#
# Jetson packages
#
RUN apt-get update && apt-get install -y --no-install-recommends \
gnupg2 \
ca-certificates \
curl && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
RUN curl -s https://repo.download.nvidia.com/jetson/jetson-ota-public.asc | apt-key add - && \
echo "deb https://repo.download.nvidia.com/jetson/common $L4T_RELEASE main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list && \
echo "deb https://repo.download.nvidia.com/jetson/${SOC} $L4T_RELEASE main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
#
# Tegra
#
RUN apt-get update && apt-get install -y --no-install-recommends \
libglu1-mesa-dev \
freeglut3-dev && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
RUN echo "/usr/lib/aarch64-linux-gnu/tegra" >> /etc/ld.so.conf.d/nvidia-tegra.conf && \
echo "/usr/lib/aarch64-linux-gnu/tegra-egl" >> /etc/ld.so.conf.d/nvidia-tegra.conf
RUN rm /usr/share/glvnd/egl_vendor.d/50_mesa.json
RUN mkdir -p /usr/share/glvnd/egl_vendor.d/ && echo '\
{\
"file_format_version" : "1.0.0",\
"ICD" : {\
"library_path" : "libEGL_nvidia.so.0"\
}\
}' > /usr/share/glvnd/egl_vendor.d/10_nvidia.json
RUN mkdir -p /usr/share/egl/egl_external_platform.d/ && echo '\
{\
"file_format_version" : "1.0.0",\
"ICD" : {\
"library_path" : "libnvidia-egl-wayland.so.1"\
}\
}' > /usr/share/egl/egl_external_platform.d/nvidia_wayland.json
RUN echo "/usr/local/cuda-$CUDA/targets/aarch64-linux/lib" >> /etc/ld.so.conf.d/nvidia.conf
RUN ldconfig
#
# Environmental variables
#
ENV PATH /usr/local/cuda-$CUDA/bin:/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/cuda-$CUDA/targets/aarch64-linux/lib:${LD_LIBRARY_PATH}
ENV LD_LIBRARY_PATH=/opt/nvidia/vpi1/lib64:${LD_LIBRARY_PATH}
ENV LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/tegra:${LD_LIBRARY_PATH}
ENV LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/tegra-egl:${LD_LIBRARY_PATH}
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES all
ENV OPENBLAS_CORETYPE=ARMV8
CMD ["/bin/bash"]