Skip to content

Commit 58a265a

Browse files
committed
add back monai data dir
Signed-off-by: Can-Zhao <[email protected]>
1 parent 4e136d1 commit 58a265a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

generation/maisi/maisi_inference_tutorial.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,10 @@
198198
}
199199
],
200200
"source": [
201-
"root_dir = \"./temp_work_dir_inference_demo\"\n",
202-
"if not os.path.isdir(root_dir):\n",
203-
" os.makedirs(root_dir)\n",
201+
"directory = os.environ.get(\"MONAI_DATA_DIRECTORY\")\n",
202+
"if directory is not None:\n",
203+
" os.makedirs(directory, exist_ok=True)\n",
204+
"root_dir = tempfile.mkdtemp() if directory is None else directory\n",
204205
"\n",
205206
"# TODO: remove the `files` after the files are uploaded to the NGC\n",
206207
"files = [\n",

0 commit comments

Comments
 (0)