From 4ff38a6cb8ac41746e463a56be149870ae6cfa10 Mon Sep 17 00:00:00 2001 From: "xiongdian.me" Date: Sat, 29 Apr 2023 18:22:53 +0800 Subject: [PATCH] init dnew --- testbed/scripts/dnew | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 testbed/scripts/dnew diff --git a/testbed/scripts/dnew b/testbed/scripts/dnew new file mode 100755 index 0000000..29c0124 --- /dev/null +++ b/testbed/scripts/dnew @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +if [[ "$EUID" == "0" ]]; then + echo "Please run as your own user (i.e., DO NOT sudo)." + exit 1 +fi +container_name=$USER_$(date +%y%m%d-%H%M%S) +image_name=${1:-"nasp-ubuntu"} +echo "container name: $container_name" +echo "image: $image_name" +sudo docker run -d --net=host -v /home2:/home2 \ + --cap-add=SYS_NICE --cap-add=IPC_LOCK \ + --device=/dev/infiniband/rdma_cm --device=/dev/infiniband/issm0 \ + --device=/dev/infiniband/umad0 --device=/dev/infiniband/uverbs0 \ + --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all \ + -v /usr/local/cuda:/usr/local/cuda --security-opt \ + seccomp=unconfined --ulimit memlock=-1:-1 \ + --name $container_name -it $image_name bash