-
-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathContainerfile.rootfs.22_04
114 lines (101 loc) · 2.75 KB
/
Containerfile.rootfs.22_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
105
106
107
108
109
110
111
112
113
114
FROM ubuntu:jammy
LABEL org.opencontainers.image.authors="Badr @pythops"
# Add focal main repo
RUN echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal main" >> /etc/apt/sources.list && \
apt update
RUN rm /var/lib/dpkg/info/libc-bin.* && \
apt-get clean && \
apt-get update && \
apt-get install libc-bin
# 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 \
libncursesw5 \
libdrm-common \
libdrm2 \
libegl-mesa0 \
libegl1 \
libegl1-mesa \
libgtk-3-0 \
libgstreamer1.0-0 \
libgstreamer-plugins-bad1.0-0 \
i2c-tools \
bridge-utils \
libffi7 \
libvulkan1 \
libssl1.1 && \
apt install -y wget cpio busybox && \
wget http://launchpadlibrarian.net/354032550/libffi6_3.2.1-8_arm64.deb && \
dpkg -i libffi6_3.2.1-8_arm64.deb
# Additional tools
RUN apt install -y \
systemd \
bash-completion \
build-essential \
pkg-config \
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 \
fdisk \
e2fsprogs \
mtd-utils \
python-is-python3 \
git
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