-
-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathContainerfile.rootfs.20_04
104 lines (91 loc) · 2.42 KB
/
Containerfile.rootfs.20_04
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
FROM ubuntu:focal
LABEL org.opencontainers.image.authors="Badr @pythops"
# Install systemd
RUN apt update && apt install -y systemd
# Update apt mirrors
RUN echo "deb http://ports.ubuntu.com/ubuntu-ports/ bionic main" >> /etc/apt/sources.list && \
apt update
# Nvidia required packages
RUN apt install -y \
libgles2 \
libpangoft2-1.0-0 \
libxkbcommon0 \
libwayland-egl1 \
libwayland-cursor0 \
libunwind8 \
libasound2 \
libpixman-1-0 \
libjpeg-turbo8 \
libinput10 \
libcairo2 \
device-tree-compiler \
iso-codes \
libffi6 \
libncursesw5 \
libdrm-common \
libdrm2 \
libegl-mesa0 \
libegl1 \
libegl1-mesa \
libgtk-3-0 \
python2 \
python-is-python2 \
libgstreamer1.0-0 \
libgstreamer-plugins-bad1.0-0 \
i2c-tools \
bridge-utils
# Additional tools
RUN apt install -y \
bash-completion \
build-essential \
btrfs-progs \
cmake \
curl \
dnsutils \
htop \
iotop \
isc-dhcp-client \
iputils-ping \
kmod \
linux-firmware \
locales \
net-tools \
netplan.io \
pciutils \
python3-dev \
ssh \
sudo \
udev \
unzip \
usbutils \
neovim \
wpasupplicant \
parted \
gdisk \
e2fsprogs \
mtd-utils
RUN wget -q https://github.com/pythops/tegratop/releases/latest/download/tegratop-linux-arm64 -O /usr/local/bin/tegratop && \
chmod +x /usr/local/bin/tegratop
# Resize the rootfs
COPY scripts/resizerootfs.sh /usr/local/bin
COPY scripts/resizerootfs.service /lib/systemd/system
# Generate locales
RUN locale-gen en_US.UTF-8
# Network configuration
COPY config/netcfg.yaml /etc/netplan/netcfg.yaml
# Enable services at startuo
RUN systemctl enable resizerootfs.service && \
systemctl enable systemd-timesyncd
# New user
# username: jetson
# password: jetson
RUN useradd \
--create-home \
-G sudo,video,audio \
-p $(openssl passwd -6 jetson) \
-s /bin/bash \
jetson
# Add /usr/local/cuda/bin to the PATH
RUN echo "if [ -d \"/usr/local/cuda/bin\" ] ; then" >> /home/jetson/.profile && \
echo " PATH=\"/usr/local/cuda/bin:\$PATH\"" >> /home/jetson/.profile && \
echo "fi" >> /home/jetson/.profile