dockerfiles/nasp-ubuntu/Dockerfile

33 lines
1.5 KiB
Docker
Raw Normal View History

2023-04-28 17:01:54 +08:00
FROM docker.io/ubuntu:22.04
# Install dependencies
2023-04-28 17:45:57 +08:00
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& sed -i "s@http://.*archive.ubuntu.com@http://192.168.16.201/mirrors@g" /etc/apt/sources.list \
&& apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -yq \
build-essential cmake openssh-server git-all sudo ssh sshpass pciutils \
2023-04-28 18:08:24 +08:00
python3 python3-dev python3-pip curl ca-certificates vim zsh tmux bash \
inetutils-ping less wget dialog net-tools dnsutils netcat traceroute \
2023-04-29 17:44:17 +08:00
cron htop zip dkms \
2023-04-28 17:45:57 +08:00
&& rm -rf /var/lib/apt/list/*
2023-04-29 17:44:17 +08:00
2023-04-29 18:08:43 +08:00
# mlnx ofed
2023-04-29 17:44:17 +08:00
RUN cd /tmp && wget http://192.168.16.118/MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64.tgz \
&& tar -xf MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64.tgz \
&& cd MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64 \
2023-04-29 18:08:43 +08:00
&& ./mlnxofedinstall --skip-unsupported-devices-check -q \
&& rm -rf /tmp/MLNX_OFED_LINUX-5.8-*
2023-04-29 17:44:17 +08:00
2023-04-29 18:08:43 +08:00
# cuda
RUN apt-get update -y && apt-get install -yq linux-headers-$(uname -r) \
&& apt-key del 7fa2af80 && cd /tmp && wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb \
&& dpkg -i cuda-keyring_1.0-1_all.deb && apt-get update -y \
2023-04-29 18:45:26 +08:00
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends cuda-11-3 cuda-compat-12-0
2023-04-29 18:08:43 +08:00
ENV PATH=/usr/local/cuda/bin:$PATH \
LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH \
CUDA_HOME=/usr/local/cuda
2023-04-29 18:45:26 +08:00
# startup
COPY startup.sh /etc/startup.sh
ENTRYPOINT ["/etc/startup.sh"]