fix bug; init startup.sh

This commit is contained in:
xiongdian.me 2023-04-29 18:45:26 +08:00
parent 0be1013d72
commit c8e6646009
2 changed files with 10 additions and 1 deletions

View File

@ -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) \ 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 \ && 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 \ && 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 \ ENV PATH=/usr/local/cuda/bin:$PATH \
LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH \ LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH \
CUDA_HOME=/usr/local/cuda CUDA_HOME=/usr/local/cuda
# startup
COPY startup.sh /etc/startup.sh
ENTRYPOINT ["/etc/startup.sh"]

5
nasp-ubuntu/startup.sh Executable file
View File

@ -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