From c8e66460098d0cde618aa311f7716fb331db9e0a Mon Sep 17 00:00:00 2001 From: "xiongdian.me" Date: Sat, 29 Apr 2023 18:45:26 +0800 Subject: [PATCH] fix bug; init startup.sh --- nasp-ubuntu/Dockerfile | 6 +++++- nasp-ubuntu/startup.sh | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 nasp-ubuntu/startup.sh diff --git a/nasp-ubuntu/Dockerfile b/nasp-ubuntu/Dockerfile index 49c2c74..e4d4b0b 100644 --- a/nasp-ubuntu/Dockerfile +++ b/nasp-ubuntu/Dockerfile @@ -21,8 +21,12 @@ RUN cd /tmp && wget http://192.168.16.118/MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.0 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 + && DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends 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 + +# startup +COPY startup.sh /etc/startup.sh +ENTRYPOINT ["/etc/startup.sh"] diff --git a/nasp-ubuntu/startup.sh b/nasp-ubuntu/startup.sh new file mode 100755 index 0000000..93657e0 --- /dev/null +++ b/nasp-ubuntu/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +/etc/init.d/ssh start || echo "Failed to start sshd. Maybe the port is already in use, and please check your sshd_config. This is not an error if it's the first time you run this container." +bash