|
37 | 37 | save_project_state, |
38 | 38 | set_permissions, |
39 | 39 | update_micromamba_env_in_docker, |
| 40 | + update_entrypoint_install_path, |
40 | 41 | ) |
41 | 42 |
|
42 | 43 |
|
@@ -422,24 +423,11 @@ def _collect_volumes(self, compose_data: dict) -> list[str]: |
422 | 423 | ) |
423 | 424 | new_volumes.append(f"{src_path}:{dst}") |
424 | 425 |
|
425 | | - # Collect User Python packages from their project directory to mount |
426 | | - # them to docker containers |
427 | | - existing_mounts = {Path(v.split(":", 1)[0]).name for v in new_volumes} |
428 | | - python_packages = find_python_packages(self.user_project_path) |
429 | | - |
430 | 426 | # Set permissions so that docker containers can execute the code in |
431 | 427 | # their package |
432 | | - for package in python_packages: |
433 | | - set_permissions(package, 0o755) |
434 | | - |
435 | | - for child in self.user_project_path.iterdir(): |
436 | | - if ( |
437 | | - child.is_dir() |
438 | | - and child.name not in existing_mounts |
439 | | - and child.name in python_packages |
440 | | - ): |
441 | | - dst_path = f"/opt/airflow/{child.name}" |
442 | | - new_volumes.append(f"{child.resolve().as_posix()}:{dst_path}") |
| 428 | + set_permissions(self.user_project_path, 0o755) |
| 429 | + |
| 430 | + new_volumes.append(f"{self.user_project_path.resolve().as_posix()}:/opt/airflow/{self.user_project_path.name}") |
443 | 431 |
|
444 | 432 | # Add special mounts for prod_local mode |
445 | 433 | kube_config = ( |
@@ -484,6 +472,8 @@ def _update_files(self): |
484 | 472 | entrypoint_path = ( |
485 | 473 | self.gaiaflow_path / "_docker" / "docker-compose" / "entrypoint.sh" |
486 | 474 | ) |
| 475 | + update_entrypoint_install_path(entrypoint_path, |
| 476 | + str(self.user_project_path.name)) |
487 | 477 | set_permissions(entrypoint_path) |
488 | 478 | convert_crlf_to_lf(entrypoint_path) |
489 | 479 |
|
|
0 commit comments