From 0a3e326b1b4cc2b856a108e6f99f452578dff2c6 Mon Sep 17 00:00:00 2001 From: Xuan Gu <xuan.gu@liu.se> Date: Fri, 13 Oct 2023 17:29:08 +0000 Subject: [PATCH] Update 2 files - /NVIDIA/DeepLearningExamples/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_latest.def - /NVIDIA/DeepLearningExamples/PyTorch/Segmentation/nnUNet/build.txt --- .../PyTorch/Segmentation/nnUNet/build.txt | 9 ++++++ .../nnUNet/nnunet_for_pytorch_latest.def | 29 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 NVIDIA/DeepLearningExamples/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_latest.def diff --git a/NVIDIA/DeepLearningExamples/PyTorch/Segmentation/nnUNet/build.txt b/NVIDIA/DeepLearningExamples/PyTorch/Segmentation/nnUNet/build.txt index 2bcba44..d7f9057 100644 --- a/NVIDIA/DeepLearningExamples/PyTorch/Segmentation/nnUNet/build.txt +++ b/NVIDIA/DeepLearningExamples/PyTorch/Segmentation/nnUNet/build.txt @@ -10,5 +10,14 @@ DEF_DIR=/proj/nsc_testing/xuan/berzelius-benchmarks/PyTorch/Segmentation/nnUNet/ apptainer build $CONTAINER_DIR $DEF_DIR + +MODULE_NAME=nnunet_for_pytorch +MODULE_VERSION=latest +CONTAINER_DIR=/proj/nsc_testing/xuan/containers/${MODULE_NAME}_${MODULE_VERSION}.sif +DEF_DIR=/proj/nsc_testing/xuan/berzelius-benchmarks/PyTorch/Segmentation/nnUNet/${MODULE_NAME}_${MODULE_VERSION}.def + +apptainer build $CONTAINER_DIR $DEF_DIR + + # Known issue https://github.com/NVIDIA/DeepLearningExamples/issues/1113 diff --git a/NVIDIA/DeepLearningExamples/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_latest.def b/NVIDIA/DeepLearningExamples/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_latest.def new file mode 100644 index 0000000..fabd296 --- /dev/null +++ b/NVIDIA/DeepLearningExamples/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_latest.def @@ -0,0 +1,29 @@ +Bootstrap: localimage +From: /proj/nsc_testing/xuan/containers/nvidia_pytorch_21.11-py3.sif + + +%environment + +export PYTHONNOUSERSITE=True +export OMP_NUM_THREADS=2 + +%post + +VERSION=latest + +mkdir /workspace/nnunet_pyt +cd /workspace/nnunet_pyt +git clone https://github.com/NVIDIA/DeepLearningExamples.git +mv DeepLearningExamples/PyTorch/Segmentation/nnUNet ./ +rm -rf DeepLearningExamples + +pip install --disable-pip-version-check -r requirements.txt +pip install monai==1.0.0 --no-dependencies +pip pip install numpy --upgrade + +curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" +unzip -qq awscliv2.zip +./aws/install +rm -rf awscliv2.zip aws + +cp utils/instance_norm.py /usr/local/lib/python3.8/dist-packages/apex/normalization -- GitLab