From d0d6f0094352e5b82498ef0c7774404364a77427 Mon Sep 17 00:00:00 2001
From: Xuan Gu <xuan.gu@liu.se>
Date: Wed, 27 Sep 2023 21:54:10 +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                      | 6 +++---
 PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/PyTorch/Segmentation/nnUNet/build.txt b/PyTorch/Segmentation/nnUNet/build.txt
index e3e069b..3a2a50f 100644
--- a/PyTorch/Segmentation/nnUNet/build.txt
+++ b/PyTorch/Segmentation/nnUNet/build.txt
@@ -2,7 +2,7 @@ https://catalog.ngc.nvidia.com/orgs/nvidia/resources/nnunet_for_pytorch/quick-st
 
 apptainer build containers/nvidia_pytorch_21.11-py3.sif  docker://nvcr.io/nvidia/pytorch:21.11-py3
 
-
+export APPTAINER_BINDPATH=
 gotesting
 
 MODULE_NAME=nnunet_for_pytorch
@@ -14,8 +14,7 @@ apptainer build ./containers/${MODULE_NAME}_${MODULE_VERSION}.sif ./berzelius-be
 WORK_DIR=/proj/nsc_testing/xuan/berzelius-benchmarks/PyTorch/Segmentation/nnUNet
 CONTAINER_DIR=/proj/nsc_testing/xuan/containers/${MODULE_NAME}_${MODULE_VERSION}.sif
 
-cd $WORK_DIR
-mkdir -p data results
+mkdir -p $WORK_DIR/data $WORK_DIR/results
 
 
 export APPTAINER_BINDPATH=$WORK_DIR/data:/data,$WORK_DIR/results:/results
@@ -29,6 +28,7 @@ apptainer exec --nv --pwd /workspace/nnunet_pyt $CONTAINER_DIR  python /workspac
  
 
 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
 
 
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 99b03ea..86b78aa 100644
--- a/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def
+++ b/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def
@@ -16,11 +16,10 @@ 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
 
-# Fix for https://github.com/NVIDIA/DeepLearningExamples/issues/1113
-#sed 's/pytorch-lightning==1.3.8/pytorch-lightning==1.5.10/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 torchmetrics
+# Fix for https://github.com/NVIDIA/DeepLearningExamples/issues/1113
 pip install torchmetrics==0.6.0
 
 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
-- 
GitLab