MateriAppsLive docker en - cmsi/MateriAppsLive GitHub Wiki

MateriApps LIVE! (Docker edition)

[English/日本語]

The latest version of this document is available at https://github.com/cmsi/MateriAppsLive/wiki/MateriAppsLive-docker-en

MateriApps LIVE! (Docker edition) is a Docker image of MateriApps LIVE!. It is being developed and distributed as a hands-on environment of materials science application programs and also as a training environment of UNIX (UNIX commands, network, Emacs, Gnuplot), programming language (C, C++, Fortran), etc.

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.

  • What's MateriApps?

    A number of high-performance and high-precision application software for computational materials science simulation have been developed in Japan. The experimentalists and researchers in the private companies, however, don't even know the existence of such applications, and are mainly using open-source software from abroad or commercial software. MateriApps, a portal site of materials science simulation, is introducing the features and characteristics of various materials science simulation programs that have not been known widely or that are being developed in years to come.

  • What's MateriApps LIVE!?

    In the meantime, when trying to try out open-source software, installation of software itself often becomes a serious obstacle. MateriApps LIVE! offers an environment where one can try out computational materials science simulation freely, using a notebook PC, etc. All environment required to begin tutorials, such as MateriApps applications, OS (Debian GNU/Linux), editors, and visualization tools, is provided in a signgle image.

Preparation (macOS)

  1. Docker Desktop for Mac

    1. Download the Doker Desktop for Mac installer from https://www.docker.com/products/docker-desktop/ and install Doker 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. Exit 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!

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

References