Two Ways To Run Python *In* The Browser
JupyterLite WebAssembly (WASM) is changing the game with regards to Python running legitimately in the browser… JupyterLite is a Jupyter Notebook/Lab and Ipython implementation based on Pyodide. I caught wind of JupyterLite from this blog post. Easily embed a console, a notebook, or a fully-fledged IDE on any web page. In a previous blog post, we announced JupyterLite, a JupyterLab distribution that runs entirely in the web browser, backed by in-browser language kernels.
June 14, 2022
Build ADCIRC using CMake
Gone are the days of having to use config.guess and sed replcements to customize the cmplrflags.mk for a particular HPC environment. Here is the process to build the ADCIRC hydrodynamic model using CMake from the command line on a GNU/Linux host. The CMake infrastructure has only been available in the last few releases of ADCIRC, and this example uses v55.00 from the compressed tar archive of the code. The options specified below enable serial adcirc, distributed parallel padcirc, coupled serial adcswan (ADCIRC+SWAN), and the parallel coupled padcswan model. Standalone parallel SWAN and unstructured SWAN models are also configured, along with the adcprep ADCIRC pre-processor and other utilities.
June 7, 2022
SWAN Wave Model Container with MPI
Coinciding with the Containers at TACC training taking place today via webinar, here is a method I have used successfully to build our version of SWAN v41.10 spectral wave model in order to run with MPI on the University of Texas’ Stampede2 cluster. Build SWAN with Docker The following Dockerfile will build the parallel mpi implementation of SWAN, the single-core serial SWAN model, and the SWAN hcat concatenation utility. The containerized model should be able to be used for 2D non-stationary, 1D or stationary simulations.
May 4, 2022
USB Cables for Sony Alpha Cameras
Intermittent problems getting my PC to recognize my Sony a6000 and a5100 mirrorless cameras led me to some web searching for solutions that I thought would be either software, driver, system OS, or firmware related. I found the following instructions which shed some light on the issue: Insert USB-A into computer and Micro-USB into camera; and power the camera on. If the computer doesn’t recognize the camera, try another cable…
April 25, 2022
Reclaim Docker WSL Disk Space
I ran out of system SSD disk space on my Win10 PC at home and tracked a large share of the usage to a vhdx virtual disk image file in a Docker Desktop folder. Below is the summary of what I found. Docker Desktop for Windows uses WSL to manage all your images and container files and keeps them in a private virtual hard drive (VHDX) called ext4.vhdx. It’s usually in C:\Users\YOURNAME\AppData\Local\Docker\wsl\data and you can often reclaim some of the space if you’ve cleaned up (pruned your images, etc) with Optimize-Vhd under an administrator PowerShell shell/prompt.
April 15, 2022
Another Example Visualization of LarvaMap Output
Found another old animation sample that was uploaded to YouTube. Again, Python’s visvis library used to render LarvaMap model output. While visvis is not longer being actively developed, it is still an incredibly powerful and efficient opengl toolkit for Python.
April 14, 2022
Example 3D Visualization of Lagrangian Particle Behavior
Found an old animation while cleaning up my computer. Python’s visvis library used to render LarvaMap model output. Sample model output animation
April 10, 2022
Bad Hacks to Find Linux Drive Device from UUID
On linux, you can’t count on the devices listed under /dev/sd* or /dev/xvd*, to have the same names or order. With the UUID (which is how /etc/fstab usually specifies how to mount the root system device), the /dev device name can be determined using the blkid command and some hacky bash. # For a system that uses /dev/sda, etc. use 0:8 string slice for blkid MYDEVICE=$(blkid | grep ${MYUUID}) ; echo ${MYDEVICE:0:8} # /dev/sdc However, you might need to do something like start a Docker container with your main system device connected using docker run --device=..., and so the following also works in this specific case looking for the device mounted at the local machine’s /.
March 24, 2022