Skip to content

Commit

Permalink
Add docker default platform to data explorer (#841)
Browse files Browse the repository at this point in the history
Adding docker default platform to the execution command of the data
explorer.
  • Loading branch information
mrchtr authored Feb 5, 2024
1 parent 36d0b2a commit 47776be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fondant/explore.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ def run_explorer_app( # type: ignore # noqa: PLR0913
]

try:
subprocess.check_call(cmd, stdout=subprocess.PIPE) # nosec
subprocess.check_call( # nosec
cmd,
stdout=subprocess.PIPE,
env=dict(os.environ, DOCKER_DEFAULT_PLATFORM="linux/amd64"),
)
except subprocess.CalledProcessError as e:
raise SystemExit(e.returncode)

Expand Down
3 changes: 3 additions & 0 deletions tests/test_explorer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from pathlib import Path
from unittest.mock import patch

Expand Down Expand Up @@ -69,6 +70,7 @@ def test_run_data_explorer_local_base_path(
"--detach",
],
stdout=-1,
env=dict(os.environ, DOCKER_DEFAULT_PLATFORM="linux/amd64"),
)


Expand Down Expand Up @@ -116,6 +118,7 @@ def test_run_data_explorer_remote_base_path(
"--detach",
],
stdout=-1,
env=dict(os.environ, DOCKER_DEFAULT_PLATFORM="linux/amd64"),
)


Expand Down

0 comments on commit 47776be

Please sign in to comment.