The xESMF python package can only be run in Linux or macOS (as mentioned in the package documentation) As such, to be able to run it within windows, there are 2 main options:
The instructions are from WSL instructions
- Open PowerShell
- Run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
. This enables the Windows Subsystem for Linux. - Run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
This will enable the Virtual Machine Platform optional feature. - Restart the computer.
- Download and install the WSL2 Linux Kernel
- Run:
wsl --set-default-version 2
. This sets the default WSL version to 2. - Install your preferred Linux distribution from the (MS Store](https://aka.ms/wslstore). Some examples:
- [Optional] Install Windows Terminal
- Run steps 1 to 6 from Windows Subsystem for Linux (WSL).
- Download Docker and install it
- Note: No need to create an account or log in.
- Note: Select 'Add to Path' option
- Download the
Dockerfile
file from this repository - Start PowerShell and change directory (
cd
) into the folder you are using - Run:
docker build -t xesmf-img -f .\Dockerfile .
and wait for it to complete - Run the docker container using:
docker run --name xesmf-container -v ${pwd}:/ds -p 8888:8888 xesmf-img
- In a browser, navigate to
http://127.0.0.1:8888/tree
- To add packages to the image, run
docker exec -it xesmf-container bash
from another PowerShell instance. You must start the container first by running:docker start -i xesmf-container
- Stop all containers:
docker stop $(docker container ls -aq)
- Remove all containers:
docker rm $(docker container ls -aq)