Metanorma Docker vs Native: maintenance and performance
Metanorma has been available on Windows as a Docker container, but running Docker for Metanorma has proven to be very resource-draining for users, and at least, an ongoing maintenance nightmare for those not familiar with it.
On macOS, the native installation runs few times faster than the Docker container version, allowing for some very realistic gains when iterating standard documents, and we have been wanting to bring the same for those on Windows.
A primer on Chocolatey
For a very long time, the world of Windows did not have a
command-line package management system as in
Linux, or like Homebrew on macOS.
In 2011, a tool called “Chocolatey” was released, and life
on Windows has since been changed…
Chocolatey is a package manager and installer for software packages built for Windows. As its base, it is an execution engine using the NuGet packaging infrastructure and Windows PowerShell to provide an automation tool for installing software on Windows machines.
Installing Metanorma on Windows using Chocolatey
Enter the Metanorma Chocolatey package, the officially supported Windows package for installing Metanorma natively on your Windows machine.
The very short and simple steps:
Install Chocolatey according to their Chocolatey installation guide.
Once Chocolatey is installed, install Metanorma using one single command (
-yfor “yes to all”) (well, some more commands need to be run before that one):
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) cinst msys2 --params "/NoUpdate" -y # install msys2 without system update cinst metanorma -y refreshenv
These instructions have been updated on 2019-05-25 to reflect the latest practice
By the end of this command you will see this message:
Environment Vars (like PATH) have changed. Close/reopen your shell to see the changes (or in powershell/cmd.exe just type `refreshenv`). The install of metanorma was successful. Software install location not explicitly set, could be in package or default install location if installer. Chocolatey installed 13/13 packages. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Installed: - nodejs v11.9.0 - plantuml v1.2019.0 - javaruntime v8.0.191 - sed v4.5 - gnuwin32-coreutils.portable v5.3.0 - metanorma v1.1.3 - graphviz v188.8.131.5271119 - xsltproc v184.108.40.206 - git.install v2.20.1 - jre8 v8.0.201 - nodejs.install v11.9.0 - git v2.20.1 - make v4.2.1
And voilà! You are now ready to use Metanorma with native performance.