Skip to content

mmartinescu/xesmf-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Running xESMF package on Windows

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:

Instructions

Windows Subsystem for Linux (WSL)

The instructions are from WSL instructions

  1. Open PowerShell
  2. Run: dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart. This enables the Windows Subsystem for Linux.
  3. Run: dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart This will enable the Virtual Machine Platform optional feature.
  4. Restart the computer.
  5. Download and install the WSL2 Linux Kernel
  6. Run: wsl --set-default-version 2. This sets the default WSL version to 2.
  7. Install your preferred Linux distribution from the (MS Store](https://aka.ms/wslstore). Some examples:
  8. [Optional] Install Windows Terminal

Docker

  1. Run steps 1 to 6 from Windows Subsystem for Linux (WSL).
  2. Download Docker and install it
    • Note: No need to create an account or log in.
    • Note: Select 'Add to Path' option
  3. Download the Dockerfile file from this repository
  4. Start PowerShell and change directory (cd) into the folder you are using
  5. Run: docker build -t xesmf-img -f .\Dockerfile . and wait for it to complete
  6. Run the docker container using: docker run --name xesmf-container -v ${pwd}:/ds -p 8888:8888 xesmf-img
  7. In a browser, navigate to http://127.0.0.1:8888/tree

Other useful functions/commands

  • 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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published