Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: development domino py mount #34

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions docs/development/domino-py.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,23 @@ This will activate some development features, such as:
**Workaround:** As mentioned before, currently we don't have a direct way to allow hot reloading for domino package in pieces containers, however, you can use the following workaround:
:::

1. Go to `domino/src/domino/custom_operators/docker_operator.py` file.
2. In the `__init__` method and start the `mounts` variable with the following code:
1. Go to `src/domino/custom_operators/docker_operator.py` file.
2. find the following code:
```python
mounts = [
Mount(source='/path/to/domino/src/domino', target='/home/domino/domino_py/', type='bind', read_only=True)
]
dev_pieces = False
if dev_pieces:
piece_repo_name = repository_url.split("/")[-1]
local_repos_path = f"/path/to/your/pieces/location/{piece_repo_name}"
mounts = [
Mount(source='/path/to/your/domino/location/src/domino', target='/usr/local/lib/python3.10/site-packages/domino/', type='bind', read_only=True),
Mount(source=local_repos_path, target='/home/domino/pieces_repository/', type='bind', read_only=True),
]

```
The `source` must be the path to your local domino package. The `target` must be the path where the domino package will be mounted in the pieces container, by default the pieces images are built to use `/home/domino/domino_py/`.
**DEPRECATED WARNING:** The target path will be deprecated in the next update since the pieces will be built using `/home/domino/domino_py/src/domino` as the default path for the domino package.
3. Change the `dev_pieces` parameter to `True` and populate the `source` in each `mount` path with a folder pointing to: domino source code and a folder containing all source codes for the pieces used by your workflows .

:::note
The workflow will attempt to use your mounted pieces folder, so all pieces must be present in the mounted folder. If not, the workflow will fail in execution.
:::


Loading