This commit is contained in:
xiongdian.me 2023-04-29 18:08:43 +08:00
parent 3dd0003bcc
commit 0be1013d72

View File

@ -10,8 +10,19 @@ RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
cron htop zip dkms \ cron htop zip dkms \
&& rm -rf /var/lib/apt/list/* && rm -rf /var/lib/apt/list/*
# mlnx ofed
RUN cd /tmp && wget http://192.168.16.118/MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64.tgz \ 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 \ && 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 \ && cd MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64 \
&& ./mlnxofedinstall --skip-unsupported-devices-check -q && ./mlnxofedinstall --skip-unsupported-devices-check -q \
&& rm -rf /tmp/MLNX_OFED_LINUX-5.8-*
# 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 \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommend cuda-11-3 cuda-compat-12-0
ENV PATH=/usr/local/cuda/bin:$PATH \
LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH \
CUDA_HOME=/usr/local/cuda