From 17bbf589f78f6fa4d231affef872c665ed28fc29 Mon Sep 17 00:00:00 2001 From: hndrr Date: Tue, 15 Jul 2025 02:27:12 +0900 Subject: [PATCH] Remove code mount from Modal app initialization and add local directory for ai-toolkit --- run_modal.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/run_modal.py b/run_modal.py index c7364f22..6c64b45d 100644 --- a/run_modal.py +++ b/run_modal.py @@ -69,14 +69,16 @@ image = ( "huggingface_hub", "peft" ) + .add_local_dir("D:/ai-toolkit", "/root/ai-toolkit") ) # mount for the entire ai-toolkit directory # example: "/Users/username/ai-toolkit" is the local directory, "/root/ai-toolkit" is the remote directory -code_mount = modal.Mount.from_local_dir("D:/ai-toolkit", remote_path="/root/ai-toolkit") +# code_mount = modal.Mount.from_local_dir("D:/ai-toolkit", remote_path="/root/ai-toolkit") # create the Modal app with the necessary mounts and volumes -app = modal.App(name="flux-lora-training", image=image, mounts=[code_mount], volumes={MOUNT_DIR: model_volume}) +# app = modal.App(name="flux-lora-training", image=image, mounts=[code_mount], volumes={MOUNT_DIR: model_volume}) +app = modal.App(name="flux-lora-training", image=image, volumes={MOUNT_DIR: model_volume}) # Check if we have DEBUG_TOOLKIT in env if os.environ.get("DEBUG_TOOLKIT", "0") == "1":