Skip to content

sk-ai-net/tensors-eKsplorer

Repository files navigation

tensors-eKsplorer

A simple cross‑platform app to explore tensor model files.

Basic features

  • Open supported model files
  • Browse tensors and metadata
  • See tensor names, shapes, and dtypes
  • View basic stats and details
  • Works on Desktop (JVM), Web, Android, and iOS

BAsed on idea from https://github.com/ericlbuehler/safetensors_explorer

Screenshot

App with mock data

App screenshot

Web app (GitHub Pages)

You can try tensors‑eKsplorer in the browser — no install required:

The site is built from the WASM/JS target and published via GitHub Pages.

Run the web app locally

There are two common ways to run the app locally: with Gradle (recommended for development) or with Docker.

Option A — Gradle dev server (no Docker)

Prerequisites:

  • JDK 17+
  • Git and the Gradle wrapper (included)

Commands:

  1. Run the WASM dev server (fast iteration):
./gradlew :composeApp:wasmJsBrowserDevelopmentRun

This starts a local dev server (default http://localhost:8080) and hot‑reloads on changes.

  1. Alternatively, run the JS dev server:
./gradlew :composeApp:jsBrowserDevelopmentRun
  1. Build a static production bundle (to host anywhere):
./gradlew :composeApp:wasmJsBrowserDistribution

The static site will be generated under one of:

  • composeApp/build/dist/wasmJs/productionExecutable/

Option B — Docker

If you prefer not to install JDK/Gradle locally, you can use Docker. Below are two Dockerfile variants — pick one that fits your workflow.

1) Dev server in a container (hot reload during local development)

Create a file named Dockerfile.dev with:

# syntax=docker/dockerfile:1
FROM gradle:8.10.2-jdk17 AS dev
WORKDIR /app

# Copy only Gradle descriptors first for better layer caching
COPY settings.gradle.kts build.gradle.kts ./
COPY gradle.properties ./
COPY gradle ./gradle

# Copy source
COPY composeApp ./composeApp
COPY shared ./shared

# Expose the default dev server port
EXPOSE 8080

# Run the WASM dev server
CMD ["gradle", ":composeApp:wasmJsBrowserDevelopmentRun"]

Build and run:

docker build -f Dockerfile.dev -t tensors-eksplorer-dev .
docker run --rm -it -p 8080:8080 tensors-eksplorer-dev

Open http://localhost:8080

Note: the dev image runs Gradle’s dev server; for live code editing with instant reloads, mount your local project into the container (-v "$PWD:/app").

2) Static site served by NGINX (production‑like)

Create Dockerfile with a multi‑stage build:

# syntax=docker/dockerfile:1
FROM gradle:8.10.2-jdk17 AS build
WORKDIR /src
COPY . .
RUN gradle :composeApp:wasmJsBrowserDistribution --no-daemon

FROM nginx:1.27-alpine AS runtime
COPY --from=build /src/composeApp/build/dist/wasmJs/productionExecutable /usr/share/nginx/html
EXPOSE 80

Build and run:

docker build -t tensors-eksplorer-web .
docker run --rm -p 8080:80 tensors-eksplorer-web

Open http://localhost:8080

If your Gradle/Kotlin plugin writes the bundle to a slightly different path, adjust the COPY line accordingly (e.g. to /src/composeApp/build/dist/wasmJs/).


Tips

  • For local files/models in the web app, you typically use the browser file picker; the app does not upload files to a server.
  • For platform‑specific builds (Desktop/Android/iOS), see the Gradle tasks and source sets under composeApp/ and shared/.

About

Tensors exploration utility

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages