diff --git a/data_explorer/Dockerfile b/data_explorer/Dockerfile index f93dbbfdc..8195bb19f 100644 --- a/data_explorer/Dockerfile +++ b/data_explorer/Dockerfile @@ -14,4 +14,5 @@ COPY ./app /app WORKDIR /app -ENTRYPOINT ["streamlit", "run", "/app/main.py", "--server.port=8501", "--server.address=0.0.0.0"] \ No newline at end of file +ENTRYPOINT [ "streamlit", "run" ] +CMD [ "/app/main.py", "--server.headless", "true", "--server.fileWatcherType", "none", "--browser.gatherUsageStats", "false", "--server.port=8501", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/data_explorer/app/widgets.py b/data_explorer/app/widgets.py index 3737a7389..c12b0675f 100644 --- a/data_explorer/app/widgets.py +++ b/data_explorer/app/widgets.py @@ -27,12 +27,12 @@ def build_sidebar() -> Tuple[Optional[str], Optional[str], Optional[Dict]]: """ # text field for manifest path st.sidebar.title("Subset loader") - # find all the files with filename `manifest.txt` in the `/artifacts` folder + # find all the files with filename `manifest.json` in the `/artifacts` folder manifest_path = st.sidebar.text_input("Manifest path", help="""Path to the manifest file. If a data directory is mounted, the files are under - `/artifacts`. Remote files can be accessed under - their URL (e.g. gs://bucket/folder/manifest.txt, if the + `/`. Remote files can be accessed under + their URL (e.g. gs://bucket/folder/manifest.json, if the correct credentials are set up.""") # load manifest diff --git a/docs/data_explorer.md b/docs/data_explorer.md index 10be5d10a..f44e6415e 100644 --- a/docs/data_explorer.md +++ b/docs/data_explorer.md @@ -1,10 +1,10 @@ # Data explorer ## How to use? -You can setup the data explorer container with the `fondant-explorer` CLI command, which is installed together with the Fondant python package. +You can setup the data explorer container with the `fondant explore` CLI command, which is installed together with the Fondant python package. ``` -fondant-explorer --data-directory LOCAL_FOLDER_TO_MOUNT [--port PORT --container CONTAINER --tag TAG] +fondant explore --data-directory LOCAL_FOLDER_TO_MOUNT [--port PORT --container CONTAINER --tag TAG] ``` ## Data explorer UI diff --git a/src/fondant/explorer.py b/src/fondant/explorer.py index a701623ea..a98bbf469 100644 --- a/src/fondant/explorer.py +++ b/src/fondant/explorer.py @@ -42,7 +42,9 @@ def run_explorer_app( # mount the local data directory to the container if data_directory: print(data_directory) - cmd.extend(["-v", f"{shlex.quote(data_directory)}:/artifacts"]) + cmd.extend( + ["-v", f"{shlex.quote(data_directory)}:{shlex.quote(data_directory)}"], + ) # add the image name cmd.extend( diff --git a/tests/test_explorer.py b/tests/test_explorer.py index 1a2d3af86..ea9ffd37f 100644 --- a/tests/test_explorer.py +++ b/tests/test_explorer.py @@ -48,7 +48,7 @@ def test_run_data_explorer_with_data_dir(): "-p", f"{DEFAULT_PORT}:8501", "-v", - f"{data_directory}:/artifacts", + f"{data_directory}:{data_directory}", f"{DEFAULT_CONTAINER}:{DEFAULT_TAG}", ], stdout=subprocess.PIPE, @@ -111,7 +111,7 @@ def test_run_data_explorer_full_option(): "-v", "/path/to/credentials:ro", "-v", - "/path/to/source:/artifacts", + "/path/to/source:/path/to/source", "ghcr.io/ml6team/data_explorer_test:earliest", ], stdout=-1,