diff --git a/src/fondant/dataset/compiler.py b/src/fondant/dataset/compiler.py index fce63514..1d6964b8 100644 --- a/src/fondant/dataset/compiler.py +++ b/src/fondant/dataset/compiler.py @@ -180,10 +180,10 @@ def resolve_local_base_path(base_path: Path) -> Path: volume = DockerVolume( type="bind", source=str(p_base_path), - target=f"/{p_base_path.stem}", + target=str(p_base_path), ) - path = f"/{p_base_path.stem}" - return path, volume + + return str(p_base_path), volume def _generate_spec( self, @@ -246,7 +246,7 @@ def _generate_spec( command.extend( [ "--working_directory", - working_directory, + path, ], ) diff --git a/tests/pipeline/test_compiler.py b/tests/pipeline/test_compiler.py index 2052ae7e..bcf85e47 100644 --- a/tests/pipeline/test_compiler.py +++ b/tests/pipeline/test_compiler.py @@ -213,7 +213,6 @@ def test_docker_local_path(setup_pipeline, tmp_path_factory): with tmp_path_factory.mktemp("temp") as fn: # this is the directory mounted in the container _, _, dataset, cache_dict = setup_pipeline - work_dir_stem = f"/{fn.stem}" working_directory = str(fn) compiler = DockerCompiler() output_path = str(fn / "docker-compose.yml") @@ -234,14 +233,14 @@ def test_docker_local_path(setup_pipeline, tmp_path_factory): assert component_configs.volumes == [ { "source": str(fn), - "target": work_dir_stem, + "target": str(fn), "type": "bind", }, ] cleaned_pipeline_name = dataset.name.replace("_", "") # check if commands are patched to use the working dir expected_output_manifest_path = ( - f"{work_dir_stem}/{cleaned_pipeline_name}/{expected_run_id}" + f"{str(fn)}/{cleaned_pipeline_name}/{expected_run_id}" f"/{component_name}/manifest.json" )