5
5
6
6
PROJECT_ROOT = Path .cwd ()
7
7
8
+ # Check if we're in a composable environment
9
+ if os .getenv ("IS_COMPOSABLE" ):
10
+ # If composable, change to the specified directory
11
+
12
+ PROJECT_ROOT = Path ("/home/cdsw/synthetic-data-studio" )
13
+ else :
14
+ # Otherwise, use the current directory as the project root
15
+ PROJECT_ROOT = Path .cwd ()
16
+
8
17
# Add project root to Python path
9
18
sys .path .insert (0 , str (PROJECT_ROOT ))
10
-
11
19
# Import PathManager
12
20
from app .core .path_manager import PathManager
13
21
path_manager = PathManager ()
@@ -22,15 +30,16 @@ def ensure_uv_installed():
22
30
23
31
# Setup virtual environment and dependencies
24
32
def setup_environment ():
25
- project_root = path_manager .root_dir
26
- venv_dir = project_root / ".venv"
33
+ # project_root = path_manager.root_dir
34
+ # print("path_root: ", project_root)
35
+ venv_dir = PROJECT_ROOT / ".venv"
27
36
28
37
# Create venv if it doesn't exist - specifying the path explicitly
29
38
if not venv_dir .exists ():
30
- subprocess .run (["uv" , "venv" , ".venv" ], cwd = project_root , check = True )
39
+ subprocess .run (["uv" , "venv" , ".venv" ], cwd = PROJECT_ROOT , check = True )
31
40
32
41
# Install dependencies with uv pip instead of sync to avoid pyproject.toml parsing issues
33
- subprocess .run (["uv" , "pip" , "install" , "-e" , "." ], cwd = project_root , check = True )
42
+ subprocess .run (["uv" , "pip" , "install" , "-e" , "." ], cwd = PROJECT_ROOT , check = True )
34
43
35
44
# Main execution
36
45
with path_manager .in_project_directory ():
0 commit comments