-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
118 lines (105 loc) · 3.83 KB
/
Dockerfile
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
115
116
117
118
ARG UBUNTU_NAME=noble
FROM ubuntu:${UBUNTU_NAME}
ARG UBUNTU_NAME
ARG UBUNTU_RELEASE=24.04
ARG UBUNTU_RELEASE_SIMPLE=2404
ARG NVIDIA_DRIVER_VERSION=560
ARG CUDA_VERSION=12-6
ARG KERNEL_VERSION=generic-hwe-24.04
LABEL org.opencontainers.authors="KOLEJKA <[email protected]>"
ENTRYPOINT ["/bin/bash"]
WORKDIR /root
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV DEBIAN_PRIORITY critical
ENV DEBIAN_FRONTEND noninteractive
RUN rm -f /etc/apt/sources.list.d/*
RUN echo "deb http://archive.ubuntu.com/ubuntu/ ${UBUNTU_NAME} main restricted universe multiverse" > /etc/apt/sources.list && \
echo "deb http://archive.ubuntu.com/ubuntu/ ${UBUNTU_NAME}-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb http://archive.ubuntu.com/ubuntu/ ${UBUNTU_NAME}-backports main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb http://security.ubuntu.com/ubuntu ${UBUNTU_NAME}-security main restricted universe multiverse" >> /etc/apt/sources.list && \
apt-get update && \
apt-get -f -y install \
apt-transport-https \
apt-utils \
curl \
locales \
software-properties-common \
&& \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 && \
true
RUN curl --silent --show-error --fail --location --output /tmp/docker.gpg "https://download.docker.com/linux/ubuntu/gpg" && \
cat /tmp/docker.gpg |gpg --dearmor > /etc/apt/trusted.gpg.d/docker.gpg && \
rm -f /tmp/docker.gpg && \
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu noble stable" > /etc/apt/sources.list.d/docker.list && \
curl --silent --show-error --fail --location --output /tmp/cuda.deb "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb" && \
dpkg -i /tmp/cuda.deb && \
rm -f /tmp/cuda.deb && \
curl --silent --show-error --fail --location --output /tmp/nvidia.gpg "https://nvidia.github.io/nvidia-docker/gpgkey" && \
cat /tmp/nvidia.gpg |gpg --dearmor > /etc/apt/trusted.gpg.d/nvidia.gpg && \
rm -f /tmp/nvidia.gpg && \
echo "deb [arch=amd64] http://nvidia.github.io/libnvidia-container/stable/deb/amd64 /" >> /etc/apt/sources.list.d/nvidia.list && \
apt-add-repository --no-update ppa:kolejka/kolejka && \
apt-get update && \
apt-get -y dist-upgrade
RUN apt-get -f -y install \
linux-headers-${KERNEL_VERSION} \
linux-image-${KERNEL_VERSION} \
linux-tools-${KERNEL_VERSION} \
ubuntu-minimal \
ubuntu-server \
&& \
true
RUN apt-get -f -y install \
casper \
docker-ce \
ethtool \
git \
iptables \
python3-kolejkaforeman \
lshw \
lvm2 \
mdadm \
nfs-client \
python3-venv \
rsync \
screen \
squashfs-tools \
ssh \
vim \
vlan \
xfsprogs \
&& \
true
RUN apt-get -f -y install --no-install-recommends \
nvidia-driver-${NVIDIA_DRIVER_VERSION} \
&& \
apt-get -f -y install \
cuda-cudart-${CUDA_VERSION} \
cuda-command-line-tools-${CUDA_VERSION} \
nvidia-container-toolkit \
&& \
true
RUN apt-get -f -y remove \
snapd \
unattended-upgrades \
&& \
true
RUN systemctl disable \
apt-daily-upgrade.timer \
apt-daily.timer \
&& \
true
RUN sed -e "s|enabled=1|enabled=0|" -i /etc/default/apport
RUN mkdir -p /etc/modprobe.d && \
echo "options nvidia \"NVreg_RestrictProfilingToAdminUsers=0\"" > /etc/modprobe.d/nvidia.conf && \
true
RUN apt-get -y autoremove
COPY rc.local /etc/rc.local
RUN chmod 755 /etc/rc.local
RUN mkdir /etc/kolejka
RUN chmod 0755 /etc/kolejka
COPY kolejka.conf /etc/kolejka/kolejka.conf
RUN chmod 0600 /etc/kolejka/kolejka.conf