Dockerizing a NetLogo model - GUI version

3 min read 8 months ago
Published on Apr 21, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Tutorial: Dockerizing a NetLogo Model - GUI Version

In this tutorial, you will learn how to containerize a NetLogo model in a Docker image and run a container that allows you to interact with its Graphic User Interface (GUI). This will enable you to open, modify, and run your containerized model just like the original version. Additionally, you will be able to create and run BehaviorSpace experiments in the container, with results easily transferred to a folder of your choice.

  • Video Title: Dockerizing a NetLogo Model - GUI Version
  • Channel: CoMSES Net YouTube Channel
  • Description: This tutorial demonstrates the process of containerizing a NetLogo model in a Docker image, running a container with GUI interaction, and conducting BehaviorSpace experiments within the container. For a detailed text tutorial, visit CoMSES website.

Overview of the Video:

  1. Introduction to Dockerizing NetLogo Model:

    • Understand the benefits of containerizing a NetLogo model.
    • Learn how Docker simplifies the deployment process.
  2. Creating a Docker Image for NetLogo Model:

    • Install Docker on your system if not already installed.
    • Build a Docker image for your NetLogo model using a Dockerfile.
    • Include necessary dependencies and configurations in the Docker image.
  3. Running a Container with GUI Interaction:

    • Start a Docker container from the created image.
    • Configure the container to enable GUI interaction.
    • Access and interact with the NetLogo model's GUI within the container.
  4. Managing BehaviorSpace Experiments:

    • Set up and run BehaviorSpace experiments within the Docker container.
    • Specify the output folder for storing experiment results.
    • Transfer the experiment results to a folder of your choice outside the container.

Step-by-Step Instructions:

  1. Prepare Your Environment:

    • Ensure Docker is installed on your system.
    • Download the necessary files for your NetLogo model.
  2. Build Docker Image:

    • Create a Dockerfile with instructions for building the image.
    • Build the Docker image using the docker build command.
  3. Run Docker Container:

    • Start a Docker container from the built image using docker run command.
    • Use flags to enable GUI interaction, such as -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix.
  4. Interact with GUI:

    • Open the NetLogo model's GUI within the Docker container.
    • Modify and run the model as needed.
  5. Manage BehaviorSpace Experiments:

    • Set up BehaviorSpace experiments within the container.
    • Specify the output folder for storing experiment results.
    • Transfer the results to a local folder using Docker volumes or file sharing methods.
  6. Wrap Up:

    • Stop and remove the Docker container once you are done.
    • Save your Docker image for future use if necessary.

By following these steps, you will successfully containerize your NetLogo model in a Docker image, run a container with GUI interaction, and manage BehaviorSpace experiments seamlessly. For a more detailed guide, refer to the text tutorial on the CoMSES website.