This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
forked from MIDS-scaling-up/v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.cudabase.dev
71 lines (54 loc) · 2.83 KB
/
Dockerfile.cudabase.dev
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
# FROM arm64v8/ubuntu:xenial-20180123
FROM arm64v8/ubuntu:bionic
# AUTHOR [email protected]
# This is the base container for the Jetson TX2 board with drivers (with cuda)
# base URL for NVIDIA libs
ARG URL=http://169.44.201.108:7002/jetpacks/4.2
# Update packages, install some useful packages
RUN apt-get update && apt-get install -y gnupg2 apt-utils lbzip2 curl sudo unp && apt-get clean && rm -rf /var/cache/apt
WORKDIR /tmp
# Install drivers first
RUN curl -sL $URL/Jetson_Linux_R32.1.0_aarch64.tbz2 | tar xvfj -
RUN chown root /etc/passwd /etc/sudoers /usr/lib/sudo/sudoers.so /etc/sudoers.d/README
RUN sed -i "s/LDK_NV_TEGRA_DIR}\/config.tbz2/LDK_NV_TEGRA_DIR}\/config.tbz2 --exclude=etc\/hosts --exclude=etc\/hostname/g" /tmp/Linux_for_Tegra/apply_binaries.sh
# #RUN curl -sL http://developer.nvidia.com/embedded/dlc/l4t-jetson-tx2-driver-package-28-2 | tar xvfj -
## RUN chown root /etc/passwd /etc/sudoers /usr/lib/sudo/sudoers.so /etc/sudoers.d/README
RUN /tmp/Linux_for_Tegra/apply_binaries.sh -r / && rm -fr /tmp/*
## Pull the rest of the jetpack libs for cuda/cudnn and install
# RUN curl $URL/cuda-repo-l4t-9-0-local_9.0.252-1_arm64.deb -so cuda-repo-l4t_arm64.deb
RUN curl $URL/cuda-repo-l4t-10-0-local-10.0.166_1.0-1_arm64.deb -so cuda-repo-l4t_arm64.deb
RUN curl $URL/libcudnn7_7.3.1.28-1+cuda10.0_arm64.deb -so libcudnn_arm64.deb
RUN curl $URL/libcudnn7-dev_7.3.1.28-1+cuda10.0_arm64.deb -so libcudnn-dev_arm64.deb
## Install libs: L4T, CUDA, cuDNN
RUN dpkg -i /tmp/cuda-repo-l4t_arm64.deb
RUN apt-key add /var/cuda-repo-10-0-local-10.0.166/7fa2af80.pub
RUN apt-get update && apt-get install -y cuda-toolkit-10.0
RUN dpkg -i /tmp/libcudnn_arm64.deb
RUN dpkg -i /tmp/libcudnn-dev_arm64.deb
###
# RUN curl $URL/libopencv-dev_3.3.1_arm64.deb -so /tmp/libopencv-dev_arm64.deb
# RUN dpkg -i /tmp/libopencv-dev_arm64.deb
#### libglvnd
WORKDIR /tmp
RUN apt-get update
# RUN apt-get install -y libxext-dev libx11-dev x11proto-gl-dev git build-essential automake autogen autoconf libtool python
RUN apt-get install -y libxext-dev libx11-dev x11proto-gl-dev git automake autoconf libtool python pkg-config
RUN git clone https://github.com/NVIDIA/libglvnd.git
WORKDIR /tmp/libglvnd
RUN ./autogen.sh
RUN ./configure
RUN make -j 6
RUN make install
RUN rm -fr /tmp/libglvnd
WORKDIR /
# the required softlinks
RUN rm -f /usr/lib/aarch64-linux-gnu/libGL.so
RUN ln -s /usr/lib/aarch64-linux-gnu/libGLU.so /usr/lib/aarch64-linux-gnu/libGL.so
RUN ln -s /usr/lib/aarch64-linux-gnu/libcuda.so /usr/lib/aarch64-linux-gnu/libcuda.so.1
RUN ln -s /usr/lib/aarch64-linux-gnu/tegra/libnvidia-ptxjitcompiler.so.32.1.0 /usr/lib/aarch64-linux-gnu/tegra/libnvidia-ptxjitcompiler.so.1
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu/tegra
ENV PATH=/usr/local/cuda-10.0/bin:$PATH
RUN apt -y autoremove
# && apt-get -y autoclean
# RUN rm -rf /var/cache/apt
RUN rm -f /tmp/*.deb