-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.ubuntu.jetson
49 lines (48 loc) · 2.15 KB
/
Dockerfile.ubuntu.jetson
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
# Ubuntu Docker Image
# Build:
# docker build -f Dockerfile.ubuntu.jetson -t ubuntu:jetson .
# Change build arg SOC for chip family on jetson
#
# Requires Host:
# GPU with Compute Capability (CC) >= 5.3 See https://developer.nvidia.com/cuda-gpus
# CUDA toolkit >= 10.2
# CUDA Docker Runtime Support
# Use jetpack provided, Set Hold:
# sudo apt-mark hold docker docker.io nvidia-docker2 nvidia-container-*
# Ubuntu 18.04 CUDA 10.2 cudnn8
FROM ubuntu:18.04 AS cuda10_2-arm64
ARG SOC="t194"
ENV DEBIAN_FRONTEND="noninteractive"
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
ENV NVIDIA_REQUIRE_CUDA "cuda>=10.2"
ADD --chown=root:root https://repo.download.nvidia.com/jetson/jetson-ota-public.asc /etc/apt/trusted.gpg.d/jetson-ota-public.asc
RUN chmod 644 /etc/apt/trusted.gpg.d/jetson-ota-public.asc
RUN apt update && apt install -y --no-install-recommends \
gnupg2 curl ca-certificates
RUN echo "deb https://repo.download.nvidia.com/jetson/common r32.5 main" > /etc/apt/sources.list.d/nvidia-l4t-apt-source.list \
&& echo "deb https://repo.download.nvidia.com/jetson/${SOC} r32.5 main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list \
&& apt update \
&& rm -rf /var/lib/apt/lists/*
RUN apt update && apt install -y --no-install-recommends \
cuda-libraries-10-2 \
cuda-libraries-dev-10-2 \
cuda-minimal-build-10-2 \
cuda-command-line-tools-10-2 \
cuda-nvtx-10-2 \
cuda-cudart-10-2 \
cuda-cudart-dev-10-2 \
cuda-license-10-2 \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/local/cuda-10.2 /usr/local/cuda
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 && \
echo "/usr/local/cuda/targets/aarch64-linux/lib" >> /etc/ld.so.conf.d/nvidia.conf
ENV PATH /usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/cuda/targets/aarch64-linux/lib:${LD_LIBRARY_PATH}
RUN ldconfig
ENV CUDNN_VERSION 8.0.0.180
RUN apt update && apt install -y --no-install-recommends \
libcudnn8=$CUDNN_VERSION-1+cuda10.2 \
libcudnn8-dev=$CUDNN_VERSION-1+cuda10.2