Quickly Set Up Guacamole Using Docker
Apache Guacamole is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH. Thanks to HTML5, once Guacamole is installed on a server, all you need to access your desktops is a web browser. The Guacamole manual can be found here, but because the project is broken into 2 or more peices, it can take a bit of poking around and toggling between sections to find the exact steps one needs to quickly get up and running from scratch using Docker.
March 19, 2022
Projecting Rasters for Plotly Mapbox Plots
I like using Plotly to create interactive plots and maps straight from Python. I find it more intuitive than Bokeh’s API. When combined with Plotly’s sister library Dash, the pair can be very powerful in creating both interactive and dynamic web based tools and visualizations. While Bokeh has some native Datashader integration, including in the mapping components, the Plotly Mapbox mapping backend relies on Mapbox’s own image overlay capability to display arbitrary Datashader outputs. Plotly has very helpful documentation and includes this use case as an example.
October 13, 2021
Useful Docker Patterns (On GNU/Linux)
To easily copy files from a Docker image when you dont want to start a container, you can do the following: docker cp $(docker create --rm $IMAGE):$FROM_PATH $TO_PATH Sometimes it is useful to compare the output of a command between two Docker images, especially comparing different versions of a particular image:
August 19, 2021
Dependency Hell
I started my Python package management journey years ago using pip, then more recently I embraced Anaconda and conda more fully (particularly with the “conda-forge” repository) to resolve complex dependencies along with system/binary dependencies. Recently, when attempting to update our team’s standard Python docker image with the latest versions of the packages we use, and include some new ones, it appears that relying on conda and conda-forge is untenable: I have been unable to resolve the appropriate set of versions for the scientific Python packages our team require for our work. I have moved back to pip for packages which are not provided in the default Anaconda repository. pip has and continues to make a number of improvements, and had no problem providing our extra dependencies.
February 17, 2021
Overlooked Tools: 'watch'
There many GNU/Linux command line tools that provide continuously updated statistics or information like iotop, nload, and top. However, it is often necessary to see the output of another simple command or complex chain of tools, updated in real-time. watch is a Linux command that does just that, and by doing so, is incredibly useful for continuously monitoring the output of any Linux terminal command. Usage of the watch command is incredibly simple, as the following example monitoring the currently running tsp task in the task-spooler queue demonstrates.
February 10, 2021
Lean Philosophy
Given my experience and education, I have always been sort of philosophically aligned with the concepts in “Lean” management, production, and software development thought to have originated at Toyota in the 90’s. Using software as example, those are: Eliminate Waste If some activity could be bypassed or the result could be achieved without it, it is waste. Partially done coding eventually abandoned during the development process is waste. Extra features like paperwork and features not often used by customers are waste. Switching people between tasks is waste. Waiting for other activities, teams, processes is waste. (from wikipedia)
January 17, 2021
Singularity From Local Docker Image
One of the powerful features of Singularity is the ability to create Singularity images from Docker images, pulling directly from public or otherwise accessible Docker repositories. There are also some un- or minimally- documented ways to extend Singularity’s impressive capacity, like converting local Docker images that may not be available in a proper Docker image repo. To convert a local image without fetching from a remote repository you can use docker-daemon in the protocol as found here.
January 13, 2021
Autumn Leaves Are Free Money
'Leaves build soil, conserve water and best of all, control weeds. By using leaves as your compost and mulch you are restoring nutrients to the soil that leaves used in order to grow…They’re like a bank account that never runs dry.'
November 18, 2020
Overlooked Tools: task-spooler
Sometimes sophisticated job queue and cluster systems are overkill on office or individual PCs, especially for long lists of batch processing jobs that use comparatively few resources. Use task-spooler to queue commands on Linux and control the number of simultaneous jobs for an easy way to parallelize a list of batch jobs! This tool is a great complement to some other command line workhorses like at and batch. Task-spooler is not usually installed by default on Linux systems. It can be built by scratch after getting the source from https://vicerveza.homeunix.net/~viric/soft/ts/ or on Ubuntu (maybe other Debian based OS’s) you can use apt:
November 17, 2020
Overlooked Tools: xclip
If you have ever had a need to move the output of a Linux console command to your clipboard, xclip is the solution! To copy a file’s contents to the standard “ctl+c/v” clipboard buffer issue you can following this command: xclip -sel clip your-file-path The most useful feature is reading from a stdin pipe:
November 16, 2020