From 007b90177e2fb04ba988e66a2915ff957edc94cb Mon Sep 17 00:00:00 2001
From: Xuan Gu <xuan.gu@liu.se>
Date: Thu, 28 Sep 2023 11:20:53 +0000
Subject: [PATCH] Update 2 files

- /PyTorch/Segmentation/nnUNet/build.txt
- /PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def
---
 PyTorch/Segmentation/nnUNet/build.txt         | 24 -------------------
 .../nnUNet/nnunet_for_pytorch_21.11.0.def     |  2 +-
 2 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/PyTorch/Segmentation/nnUNet/build.txt b/PyTorch/Segmentation/nnUNet/build.txt
index f13fae9..258b491 100644
--- a/PyTorch/Segmentation/nnUNet/build.txt
+++ b/PyTorch/Segmentation/nnUNet/build.txt
@@ -11,29 +11,5 @@ MODULE_VERSION=21.11.0
 apptainer build ./containers/${MODULE_NAME}_${MODULE_VERSION}.sif ./berzelius-benchmarks/PyTorch/Segmentation/nnUNet/${MODULE_NAME}_${MODULE_VERSION}.def
 
 
-WORK_DIR=/proj/nsc_testing/xuan/berzelius-benchmarks/PyTorch/Segmentation/nnUNet
-CONTAINER_DIR=/proj/nsc_testing/xuan/containers/${MODULE_NAME}_${MODULE_VERSION}.sif
-
-mkdir -p $WORK_DIR/data $WORK_DIR/results
-
-
-export APPTAINER_BINDPATH=$WORK_DIR/data:/data,$WORK_DIR/results:/results
-
-
-To download and preprocess the data run:
-
-apptainer exec --nv --pwd /workspace/nnunet_pyt $CONTAINER_DIR python download.py --task 01  
-
-apptainer exec --nv --pwd /workspace/nnunet_pyt $CONTAINER_DIR  python /workspace/nnunet_pyt/preprocess.py --task 01 --dim 2
- 
-
-apptainer exec --nv --pwd /workspace/nnunet_pyt $CONTAINER_DIR python scripts/benchmark.py --mode train --gpus 1 --dim 2 --batch_size 256 --amp
-
-apptainer exec --nv --pwd /workspace/nnunet_pyt $CONTAINER_DIR python scripts/benchmark.py --mode predict --gpus 1 --dim 2 --batch_size 256 --amp
-
-
-apptainer exec --nv -B ${WORK_DIR}/data:/data -B ${WORK_DIR}/results:/results $CONTAINER_DIR bash -c "cd /workspace/nnunet_pyt && python scripts/benchmark.py --mode train --gpus 1  --dim 2 --batch_size 256 --amp" 
-
-
 # Known issue 
 https://github.com/NVIDIA/DeepLearningExamples/issues/1113
diff --git a/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def b/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def
index a0d5674..a87af2a 100644
--- a/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def
+++ b/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def
@@ -16,7 +16,7 @@ cd /workspace/nnunet_pyt
 wget --content-disposition https://api.ngc.nvidia.com/v2/resources/nvidia/nnunet_for_pytorch/versions/$VERSION/zip -O nnunet_for_pytorch_$VERSION.zip
 unzip nnunet_for_pytorch_21.11.0.zip
 
-sed 's/pytorch-lightning==1.3.8/pytorch-lightning==1.4.0/g' requirements.txt > temp_file && mv temp_file requirements.txt
+sed 's/pytorch-lightning==1.3.8/pytorch-lightning==1.5.0/g' requirements.txt > temp_file && mv temp_file requirements.txt
 pip install --disable-pip-version-check -r requirements.txt
 pip install monai==0.8.0 --no-dependencies
 pip uninstall -y torchtext 
-- 
GitLab