Setting up your Docker desktop - FASSt-simulation/fasst_simulation_tools Wiki

1. Download the Docker Desktop Application


2. Install Docker Desktop on Your Computer

  • Open the Docker Desktop Installer that you downloaded. Note that this will require having administrative privileges on your computer
  • When/if prompted, UNCHECK the box "Use WSL 2 instead of hyper-V (recommended)"
  • There will be a lot of code whizzing by as files are unpacked and the like
  • Close the installation box when it is done

3. Open Docker Desktop and Modify Settings

  • Open Docker Desktop. In Windows, you will need to do this by right-clicking on the app and selecting "Run as administrator"
  • Skip the Docker tutorial.
  • Go to Settings by opening the gear symbol in the upper right hand corner of the Docker app
  • Select the "Resources" tab on the left-hand menu
  • Select "Filesharing" tab on the left-hand menu under "Advanced"
  • Select the "+" symbol and add your computer's main drive here so Docker can access and write to your computer. For Windows this will probably look like "C:\Users\username". For Macs this will probably look like "/Users/username".
  • When you are done the Resources file sharing table should look something like this (with your username & address) Capture
  • Hit the "X" on the top bar across from Settings to go back to the main Docker screen

4. Defining Docker Volumes (2 options)

Option 1: Graphically

  • In the Docker desktop app, select the "Volumes" tab on the left-hand menu
  • Click the "Create (+)" button the upper right-hand corner
  • In the popup window, name your volume elmdata and hit "Create"
  • Make another volume called elmoutput

Option 2: Command Line

  • Open a terminal window on your computer. In Windows, do this by going to the search bar on your bottom task bar and search/select "Windows PowerShell." On a Mac, click the magnifying glass on the right side of the menu bar on top of the screen (to open Spotlight search) and type "Terminal", then open the Terminal program.
  • In the terminal window type or just copy and paste docker volume create elmdata into your terminal and hit enter
  • In the terminal window type or just copy and paste docker volume create elmoutput into your terminal and hit enter
  • You can check that this was successful by opening the docker app and navigating to the "Volumes" tab on the left hand menu. There should be 2 new volumes visible in the table that are called elmdata and elmoutput.

Regardless of whether you followed option 1 or 2, your Docker desktop volumes should now look like this: image


5. Download Docker Container (2 options)

  • Open a terminal window on your computer. In Windows, do this by going to the search bar on your bottom task bar and search/select "Windows PowerShell." On a Mac, click the magnifying glass on the right side of the menu bar on top of the screen (to open Spotlight search) and type "Terminal", then open the Terminal program.
  • In the terminal window type or just copy and paste docker pull fasstsimulation/elm-builds:elm_v2-for-ngee into your terminal and hit enter
  • Note that this download will take about 10 minutes. If it is going well, your terminal window will show progress with a series of arrows that grow from left to right during each file's download.

image

  • When this download is done, you can check that the container made it into your docker app. Select the "Images" tab in the left-hand menu in Docker. There should be an item that has an name "fasstsimulation/elm-builds" (NAME column) and "elm_v2-for-ngee" (TAG column).

image


6. Download meteorological data

Option 1: Basic functionality

  • Open a terminal window on your computer the same way you did for previous steps (using the same one again is fine too if it is still open!)
  • Type or just copy and paste docker run -t -i --hostname=docker --user modeluser -v elmdata:/inputdata fasstsimulation/elm-builds:elm_v2-for-ngee /scripts/download_elm_singlesite_forcing_data.sh into your terminal and hit enter
  • If this is working, you should see the download progressing with arrows bouncing left to right like this image
  • When the download is done, you can look in the volumes on your Docker app and see that the elm data folder is now at ~1.2GB

Option 2: Advanced, download a copy of the meteorological data to your computer

  • Create a local directory on the host computer to contain the met forcing data by running this code in your terminal mkdir -p ~/scratch/elmdata Note that the terminal window will spit back an address for this new folder that looks like this

image

  • Download the data to this location by typing the following code BUT you will need to modify the folder location to match the address on you computer where the folder elmdata lives (Ie, remove and replace C:/Users/vsi/scratch/)
docker run -t -i --hostname=docker --user modeluser -v C:/Users/vsi/scratch/elmdata:/inputdata \
fasstsimulation/elm-builds:elm_v2-for-ngee /scripts/download_elm_singlesite_forcing_data.sh
  • If this is working you will see lot of lines of code ending in .nc flash by.
  • The download will pause at one point and ask if you want to replace or a file. Hit y and enter
  • When you are done, the last line on the terminal will read *** DONE***
  • Navigate to the elmdata folder on your computer and check that it is full of data (should be ~1.2GB in size)

CONGRATULATIONS

You are ready for the NGEE Arctic Modex workshop!

image