GettingStartedDocker en - cmsi/MateriAppsLive GitHub Wiki

How to start MateriApps LIVE! (Docker edition)

[English/日本語]

MateriApps LIVE! Docker edition works on Apple Silicon (M1/M2)/Intel Macs. It also works in WSL2 (Windows Subsystem for Linux 2) on Windows 11.

Preparation (macOS)

  1. Docker Desktop for Mac

    1. Download the Docker Desktop for Mac installer from https://www.docker.com/products/docker-desktop/ and install Docker Desktop for Mac

      Note: There are two types of installers, one for Intel Chips and one for Apple Chips.

    2. Launch Docker Desktop

  2. XQuartz

    1. Download the installer (XQuartz-*.dmg) from https://www.xquartz.org and install XQuartz

    2. Launch XQuartz (Applications > Utilities > XQuartz)

    3. Open "Preferences..." from "XQuartz" menu, choose "Security" tab, and check "Authenticate connections" and "Allow connections from network clients"

    4. Quit XQuartz

    5. Open the Terminal application and run defaults write org.xquartz.X11 enable_iglx -bool true.

  3. Check of XQuartz installation

    1. Open the Terminal application, run xeyes, and confirm that the eyes are displayed.

      Tip: If it does not show up, reboot your PC to make sure.

Preparation (Windows 11)

  1. Install WSL2

    1. Open the command prompt with administrator privileges and execute wsl --install
    2. Open Ubuntu and set your username and password
  2. Install Docker

    1. Open Ubuntu and execute the following lines

      sudo apt-get install ca-certificates curl
      sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
      sudo chmod a+r /etc/apt/keyrings/docker.asc
      echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -sc) stable" | sudo tee /etc/apt/sources.list.d/docker.list
      sudo apt-get update
      sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
      sudo usermod -aG docker $USER
      
    2. Close Ubuntu and restart

How to transfer files from/to MateriApps LIVE!

  1. Create $HOME/share directory on the host OS before executing sh malive.sh. It will be shared with MateriApps LIVE!

How to start MateriApps LIVE!

  1. Open the Terminal application and execute the following lines

    curl -L -O https://malive.s3.amazonaws.com/malive.sh
    
  2. Open the Terminal application and execute the following line

    sh malive.sh
    

    N.B.: The first time will take a while as the Docker image is downloaded and the container is created.

  3. Log in to MateriApps LIVE! is automatically performed, and the prompt (user@malive:~$ ) will be displayed.

  4. Run simulations, etc., on MateriApps LIVE!

  5. Log out of MateriApps LIVE! with exit. All the files created on MateriApps LIVE! will be kept at the next login unless the container is removed

How to upgrade MateriApps LIVE!

Warning: Upgrading will erase all files except /home/user, including additionally installed Debian packages

  1. Check the published version and the currently installed version

    sh malive.sh list
    
  2. Upgrade to the latest version (and launch it)

    sh malive.sh update
    
  3. Upgrade to the specified version (and launch it)

    sh malive.sh version [version]
    

How to uninstall MateriApps LIVE!

Warning: Uninstallation process will erase all files except for `/home/user

  1. Check the currently installed version

    sh malive.sh list
    

    In the following, we assume the version number to be deleted is 4.0

  2. Uninstall MateriApps LIVE!

    sh malive.sh remove 4.0
    

The above operation does not erase the contents under /home/user. When a new version of MateriApps LIVE! is installed, the previous contents of /home/user are preserved. To completely delete the contents of /home/user, execute the following:

docker volume rm malive-vol