#!/bin/bash # Script to build and convert the Docker image to WASM # Step 1: Build the Docker image echo "Building the 32-bit Jupyter Docker image..." docker build -t jupyter-datascience-32bit -f Dockerfile . # Step 2: Install Docker-WASM tools echo "Installing Docker-WASM conversion tools..." npm install -g @wasmer/wasm-transformer npm install -g docker-wasm-cli # Step 3: Export the Docker image echo "Exporting Docker image to a tarball..." docker save jupyter-datascience-32bit -o jupyter-datascience-32bit.tar # Step 4: Convert the Docker image to WASM echo "Converting Docker image to WASM format..." docker-wasm convert jupyter-datascience-32bit.tar --output jupyter-datascience.wasm # Step 5: Create a simple HTML launcher echo "Creating HTML launcher for the WASM module..." cat > jupyter-wasm-launcher.html << 'EOL'
This page runs a Jupyter notebook server directly in your browser using WebAssembly.