Skip to content

Commit

Permalink
Small fixes explorer (#446)
Browse files Browse the repository at this point in the history
Small PR that: 

- Add pull always policy to the data explore. @Hakimovich99 ran into
some issues where the latest image was not pulled (False positive in
caching since we're using the `latest` tag)
- Fixes issue that @janvanlooy ran into that's related to the volume
mounting. Related to Windows (still to be tested if fix actually
resolves the issue).


https://stackoverflow.com/questions/50540721/docker-toolbox-error-response-from-daemon-invalid-mode-root-docker
  • Loading branch information
PhilippeMoussalli authored Sep 22, 2023
1 parent 512bbd6 commit 82d9174
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/fondant/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def run_explorer_app( # type: ignore
cmd = [
"docker",
"run",
"--pull",
"always",
"--name",
"fondant-explorer",
"--rm",
Expand Down Expand Up @@ -58,7 +60,7 @@ def run_explorer_app( # type: ignore

# Mount the local base path to the container
cmd.extend(
["-v", f"{shlex.quote(host_machine_path)}:{shlex.quote(container_path)}"],
["-v", f"/{shlex.quote(host_machine_path)}:/{shlex.quote(container_path)}"],
)

# add the image name
Expand Down
6 changes: 5 additions & 1 deletion tests/test_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def test_run_data_explorer_local_base_path(host_path, container_path, credential
[
"docker",
"run",
"--pull",
"always",
"--name",
"fondant-explorer",
"--rm",
Expand All @@ -54,7 +56,7 @@ def test_run_data_explorer_local_base_path(host_path, container_path, credential
"-v",
f"{credentials}:ro",
"-v",
f"{Path(host_path).resolve()}:{container_path}",
f"/{Path(host_path).resolve()}:/{container_path}",
f"{DEFAULT_CONTAINER}:{DEFAULT_TAG}",
"--base_path",
f"{container_path}",
Expand All @@ -78,6 +80,8 @@ def test_run_data_explorer_remote_base_path(remote_path, credentials):
[
"docker",
"run",
"--pull",
"always",
"--name",
"fondant-explorer",
"--rm",
Expand Down

0 comments on commit 82d9174

Please sign in to comment.