%% Generated by Sphinx.
\def\sphinxdocclass{report}
\documentclass[letterpaper,10pt,english]{sphinxmanual}
\ifdefined\pdfpxdimen
   \let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen
\fi \sphinxpxdimen=.75bp\relax
\ifdefined\pdfimageresolution
    \pdfimageresolution= \numexpr \dimexpr1in\relax/\sphinxpxdimen\relax
\fi
%% let collapsible pdf bookmarks panel have high depth per default
\PassOptionsToPackage{bookmarksdepth=5}{hyperref}

\PassOptionsToPackage{warn}{textcomp}
\usepackage[utf8]{inputenc}
\ifdefined\DeclareUnicodeCharacter
% support both utf8 and utf8x syntaxes
  \ifdefined\DeclareUnicodeCharacterAsOptional
    \def\sphinxDUC#1{\DeclareUnicodeCharacter{"#1}}
  \else
    \let\sphinxDUC\DeclareUnicodeCharacter
  \fi
  \sphinxDUC{00A0}{\nobreakspace}
  \sphinxDUC{2500}{\sphinxunichar{2500}}
  \sphinxDUC{2502}{\sphinxunichar{2502}}
  \sphinxDUC{2514}{\sphinxunichar{2514}}
  \sphinxDUC{251C}{\sphinxunichar{251C}}
  \sphinxDUC{2572}{\textbackslash}
\fi
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amstext}
\usepackage{babel}



\usepackage{tgtermes}
\usepackage{tgheros}
\renewcommand{\ttdefault}{txtt}



\usepackage[Bjarne]{fncychap}
\usepackage{sphinx}

\fvset{fontsize=auto}
\usepackage{geometry}


% Include hyperref last.
\usepackage{hyperref}
% Fix anchor placement for figures with captions.
\usepackage{hypcap}% it must be loaded after hyperref.
% Set up styles of URL: it should be placed after hyperref.
\urlstyle{same}


\usepackage{sphinxmessages}
\setcounter{tocdepth}{1}



\title{Documentation for Docker Installation and Usage}
\date{Jun 17, 2024}
\release{1.0}
\author{Advanced Computational Electromagnetic Model (ACEM) group}
\newcommand{\sphinxlogo}{\vbox{}}
\renewcommand{\releasename}{Release}
\makeindex
\begin{document}

\ifdefined\shorthandoff
  \ifnum\catcode`\=\string=\active\shorthandoff{=}\fi
  \ifnum\catcode`\"=\active\shorthandoff{"}\fi
\fi

\pagestyle{empty}
\sphinxmaketitle
\pagestyle{plain}
\sphinxtableofcontents
\pagestyle{normal}
\phantomsection\label{\detokenize{index::doc}}


\sphinxAtStartPar
Docker is a platform for developing, shipping, and running applications. It uses containerization technology to package software and its dependencies into standardized units called containers. These containers are lightweight, portable, and isolated, allowing applications to run consistently across different environments, from development to production.

\sphinxAtStartPar
With Docker, developers can build, ship, and deploy applications faster and more efficiently by eliminating compatibility issues between different systems. Docker simplifies the process of managing and scaling applications, making it easier to deploy and update software in any environment, whether it’s on\sphinxhyphen{}premises, in the cloud, or hybrid.

\sphinxAtStartPar
Overall, Docker revolutionizes the way applications are developed, deployed, and managed, enabling teams to innovate more rapidly and reliably.


\chapter{Motivation for Containers}
\label{\detokenize{index:motivation-for-containers}}
\sphinxAtStartPar
To see why containers are useful, let us look at the following 2 scenarios.


\begin{savenotes}\sphinxattablestart
\centering
\begin{tabular}[t]{|\X{10}{30}|\X{10}{30}|\X{10}{30}|}
\hline
\sphinxstyletheadfamily 
\sphinxAtStartPar
Scenario
&\sphinxstyletheadfamily 
\sphinxAtStartPar
Traditional Instructions
&\sphinxstyletheadfamily 
\sphinxAtStartPar
With Docker
\\
\hline
\sphinxAtStartPar
Development
&
\sphinxAtStartPar
To set up the development environment, install these libraries and run these scripts
&
\sphinxAtStartPar
“Run docker compose up”
\\
\hline
\sphinxAtStartPar
Deployment
&
\sphinxAtStartPar
To run the software, prepare Ubuntu of version 22.02. Install these dependencies and run the software
&
\sphinxAtStartPar
“Run container image with these options”
\\
\hline
\end{tabular}
\par
\sphinxattableend\end{savenotes}


\chapter{Evolution of Virtualization}
\label{\detokenize{index:evolution-of-virtualization}}
\sphinxAtStartPar
In modern computing, various technologies cater to different needs and scenarios. Bare metal, virtual machines, and containers represent three fundamental approaches to deploying and managing applications, each with its own set of advantages and use cases.


\section{1. Bare Metal}
\label{\detokenize{index:bare-metal}}
\sphinxAtStartPar
Bare metal refers to the traditional method of running applications directly on physical servers without any virtualization layer. In this setup, the operating system interacts directly with the underlying hardware. Bare metal environments offer maximum performance and control since all resources are dedicated to the application. They are ideal for high\sphinxhyphen{}performance workloads where every bit of computational power counts.

\noindent\sphinxincludegraphics[width=300\sphinxpxdimen]{{base}.png}


\section{2. Virtual Machines (VMs)}
\label{\detokenize{index:virtual-machines-vms}}
\sphinxAtStartPar
Virtual machines emulate physical hardware within a host server, allowing multiple operating systems and applications to run independently on the same physical hardware. Each VM runs its own guest operating system, providing strong isolation from other VMs. VMs offer flexibility, enabling different operating systems and configurations to coexist on the same hardware. They are commonly used for server consolidation, testing, and development environments.

\sphinxAtStartPar
When using VM, a hypervisor is usually needed. It is a software or firmware layer that enables the creation and management of virtual machines (VMs) on physical hardware. It sits between the hardware and the operating systems (OS) running on the VMs, facilitating the sharing of physical resources among multiple virtual environments.

\sphinxAtStartPar
There are two main types of hypervisors:
\begin{enumerate}
\sphinxsetlistlabels{\alph}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
Type 1 Hypervisor (Bare Metal Hypervisor):

\end{enumerate}

\sphinxAtStartPar
Type 1 hypervisors run directly on the physical hardware without the need for a host operating system. They are often referred to as “bare metal” hypervisors because they have direct access to the underlying hardware.
Examples include AWS Nitro System, VMware vSphere, and Microsoft Hyper\sphinxhyphen{}V.
Type 1 hypervisors provide efficient and high\sphinxhyphen{}performance virtualization, making them suitable for enterprise\sphinxhyphen{}level deployments and cloud computing environments.
\begin{enumerate}
\sphinxsetlistlabels{\alph}{enumi}{enumii}{}{.}%
\setcounter{enumi}{1}
\item {} 
\sphinxAtStartPar
Type 2 Hypervisor (Hosted Hypervisor):

\end{enumerate}

\sphinxAtStartPar
Type 2 hypervisors run on top of a host operating system, which means they rely on the underlying OS for hardware access.
These hypervisors are commonly used on desktop or workstation environments for development, testing, and running multiple operating systems simultaneously.
Examples include Oracle VirtualBox, VMware Workstation, and Parallels Desktop.
While Type 2 hypervisors offer ease of use and flexibility, they may introduce some performance overhead due to the additional layer of the host OS.

\noindent\sphinxincludegraphics[width=600\sphinxpxdimen]{{VM}.png}


\section{3. Containers}
\label{\detokenize{index:containers}}
\sphinxAtStartPar
Containers are lightweight, portable, and isolated environments for running applications and their dependencies. Unlike VMs, containers share the host operating system’s kernel, which reduces overhead and improves efficiency. Containers provide fast deployment times and scalability, making them ideal for microservices architectures, continuous integration and deployment (CI/CD) pipelines, and DevOps practices.

\noindent\sphinxincludegraphics[width=600\sphinxpxdimen]{{container}.png}


\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{|\X{2}{17}|\X{5}{17}|\X{5}{17}|\X{5}{17}|}
\sphinxthelongtablecaptionisattop
\caption{Comparison Between Bare Metal, Virtual Machines, and Containers\strut}\label{\detokenize{index:id1}}\\*[\sphinxlongtablecapskipadjust]
\hline
\sphinxstyletheadfamily 
\sphinxAtStartPar
Aspect
&\sphinxstyletheadfamily 
\sphinxAtStartPar
Bare Metal
&\sphinxstyletheadfamily 
\sphinxAtStartPar
Virtual Machines
&\sphinxstyletheadfamily 
\sphinxAtStartPar
Containers
\\
\hline
\endfirsthead

\multicolumn{4}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline
\sphinxstyletheadfamily 
\sphinxAtStartPar
Aspect
&\sphinxstyletheadfamily 
\sphinxAtStartPar
Bare Metal
&\sphinxstyletheadfamily 
\sphinxAtStartPar
Virtual Machines
&\sphinxstyletheadfamily 
\sphinxAtStartPar
Containers
\\
\hline
\endhead

\hline
\multicolumn{4}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

\sphinxAtStartPar
Isolation
&
\sphinxAtStartPar
No isolation between applications.
&
\sphinxAtStartPar
Strong isolation between VMs.
&
\sphinxAtStartPar
Isolated containers with shared OS kernel.
\\
\hline
\sphinxAtStartPar
Resource Utilization
&
\sphinxAtStartPar
Utilizes all resources of the physical server.
&
\sphinxAtStartPar
Resources are divided among VMs.
&
\sphinxAtStartPar
Lightweight, shares OS resources, minimal overhead.
\\
\hline
\sphinxAtStartPar
Performance
&
\sphinxAtStartPar
Offers highest performance as there’s no overhead.
&
\sphinxAtStartPar
Slightly reduced performance due to virtualization layer.
&
\sphinxAtStartPar
Near\sphinxhyphen{}native performance, minimal overhead.
\\
\hline
\sphinxAtStartPar
Scalability
&
\sphinxAtStartPar
Scalability is limited by physical hardware constraints.
&
\sphinxAtStartPar
Scalable, but constrained by host’s resources.
&
\sphinxAtStartPar
Highly scalable, can run numerous containers on a host.
\\
\hline
\sphinxAtStartPar
Deployment Time
&
\sphinxAtStartPar
Typically longer deployment times due to hardware setup.
&
\sphinxAtStartPar
Longer deployment times due to virtualization setup.
&
\sphinxAtStartPar
Very fast deployment times due to lightweight nature.
\\
\hline
\sphinxAtStartPar
Flexibility
&
\sphinxAtStartPar
Less flexible as hardware configurations are fixed.
&
\sphinxAtStartPar
More flexible due to virtual hardware configurations.
&
\sphinxAtStartPar
Highly flexible, can package and run various apps.
\\
\hline
\sphinxAtStartPar
Resource Overhead
&
\sphinxAtStartPar
No overhead as resources are dedicated to the system.
&
\sphinxAtStartPar
Overhead from virtualization layer and guest OS.
&
\sphinxAtStartPar
Minimal overhead as containers share host resources.
\\
\hline
\sphinxAtStartPar
Use Cases
&
\sphinxAtStartPar
Suitable for high\sphinxhyphen{}performance applications.
&
\sphinxAtStartPar
Used for testing, development, and server consolidation.
&
\sphinxAtStartPar
Ideal for microservices, CI/CD pipelines, and DevOps practices.
\\
\hline
\sphinxAtStartPar
Dependency management
&
\sphinxAtStartPar
Bad
&
\sphinxAtStartPar
Good
&
\sphinxAtStartPar
Good
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsection{Contents}
\label{\detokenize{index:contents}}
\sphinxstepscope


\subsubsection{Docker Desktop}
\label{\detokenize{desktop:docker-desktop}}\label{\detokenize{desktop::doc}}
\sphinxAtStartPar
Docker Desktop is a powerful tool that simplifies the development, deployment, and management of applications using containers. Here’s an introduction to Docker Desktop:


\paragraph{What is Docker Desktop?}
\label{\detokenize{desktop:what-is-docker-desktop}}
\sphinxAtStartPar
Docker Desktop is an application for both Mac and Windows operating systems that enables developers to create, deploy, and manage applications using Docker containers. It provides an easy\sphinxhyphen{}to\sphinxhyphen{}use interface for working with Docker containers, images, volumes, and networks.


\paragraph{Key Features}
\label{\detokenize{desktop:key-features}}\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Containerization}: Docker Desktop utilizes containerization technology to package applications and their dependencies into lightweight, portable containers. This allows developers to isolate applications from their environment and ensures consistent behavior across different computing environments.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Graphical User Interface (GUI)}: Docker Desktop comes with a user\sphinxhyphen{}friendly GUI that allows developers to perform container\sphinxhyphen{}related tasks such as creating, managing, and monitoring containers using a visual interface. This makes it easy for developers to interact with Docker without needing to use the command line.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Integrated Development Environment (IDE) Integration}: Docker Desktop seamlessly integrates with popular IDEs such as Visual Studio Code, allowing developers to build, debug, and test containerized applications directly from their development environment.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Multi\sphinxhyphen{}Platform Support}: Docker Desktop supports both Mac and Windows operating systems, allowing developers to build and run containerized applications on their preferred platform without needing to worry about compatibility issues.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Local Development Environment}: Docker Desktop provides a local development environment that closely mirrors production environments, allowing developers to build and test applications in an environment that closely resembles where they will eventually be deployed.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Automatic Updates}: Docker Desktop regularly receives updates and new features, ensuring that developers have access to the latest Docker capabilities and improvements.

\end{enumerate}


\paragraph{Docker Desktop Architecture}
\label{\detokenize{desktop:docker-desktop-architecture}}
\sphinxAtStartPar
Docker Desktop is a comprehensive package offered by Docker, providing both a graphical user interface (GUI) and a command\sphinxhyphen{}line interface (CLI). It serves as a unified platform for developers to manage their Docker containers and workflows seamlessly. One of its key features is its inclusion of a Linux virtual machine, which acts as the runtime environment for Docker containers on non\sphinxhyphen{}Linux systems such as Windows and macOS.

\begin{sphinxadmonition}{note}{Note:}
\sphinxAtStartPar
For Windows, it is reuqired that the user install Windows Subsystem for Linux (WSL) seperately from the installation of Docker Desktop.
\end{sphinxadmonition}

\sphinxAtStartPar
This virtual machine wraps around Docker’s core components, including the CLI and the Docker API at the server side, facilitating the creation, management, and deployment of containers. Additionally, Docker Desktop includes the Docker Daemon, which is responsible for managing container lifecycle and interacting with the operating system’s kernel.

\sphinxAtStartPar
While in a Linux environment, working directly with the Docker Engine, a lighter version of Docker, is often sufficient. However, for Windows users, especially those on Windows 11, Docker Desktop is recommended. This recommendation is primarily due to compatibility reasons, especially for users requiring NVIDIA GPU support for containerized applications.

\sphinxAtStartPar
In summary, Docker Desktop provides a unified solution for Docker container management, combining a user\sphinxhyphen{}friendly interface with essential tools and runtime environments to streamline the development and deployment of containerized applications across different operating systems.

\noindent\sphinxincludegraphics[width=900\sphinxpxdimen]{{desktop}.png}


\paragraph{Difference between images and containers}
\label{\detokenize{desktop:difference-between-images-and-containers}}
\sphinxAtStartPar
\sphinxstylestrong{Container}
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Execution Instance}: A container is a runtime instance of an image. It’s a lightweight, standalone, and executable package that encapsulates all the dependencies required to run a piece of software.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Isolation}: Containers provide process isolation, ensuring that applications running within them are isolated from one another and from the host system.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Dynamic}: Containers can be started, stopped, moved, and deleted dynamically. They are ephemeral by nature, meaning they can be created, destroyed, and replaced rapidly.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Runtime Environment}: Each container runs in its own isolated environment, including its own filesystem, networking, and process space.

\end{itemize}

\sphinxAtStartPar
\sphinxstylestrong{Image}
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Blueprint}: An image is a static, immutable blueprint used to create containers. It’s a snapshot of a container that includes the application code, runtime, libraries, dependencies, and other configuration needed to run the software.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Build Artifact}: Images are created either manually or through automated build processes. They are stored in a registry and serve as the foundation for creating containers.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Reusable}: Images can be shared, reused, and distributed across different environments and systems. They provide a consistent environment for running applications regardless of the underlying infrastructure.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Layered Structure}: Docker images are composed of multiple layers, with each layer representing a filesystem change. This layered structure enables efficient storage, distribution, and reuse of images.

\end{itemize}

\sphinxAtStartPar
\sphinxstylestrong{Key Differences}
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Statefulness}: Containers are dynamic and stateful, while images are static and stateless. Containers can be modified and retain changes during runtime, whereas images remain immutable.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Lifecycle}: Containers have a lifecycle—they can be created, started, stopped, paused, and deleted. Images, on the other hand, do not have a lifecycle; they are static artifacts used to create containers.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Composition}: Images serve as the building blocks for containers. Multiple containers can be instantiated from the same image, each running independently with its own isolated environment.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Persistence}: Containers are ephemeral, meaning any changes made inside a container only persist as long as the container is running. Images, being immutable, preserve the state of the filesystem at the time of creation.

\end{enumerate}

\sphinxAtStartPar
In essence, containers are the runtime instances of images, while images are the blueprints used to create containers. They work together to enable the efficient deployment, management, and execution of applications in a containerized environment.


\paragraph{Installation in Windows}
\label{\detokenize{desktop:installation-in-windows}}
\sphinxAtStartPar
Generally, enabling virtualization from the BIOS and installing Windows Subsystem for Linux (WSL) are crucial steps for setting up Docker Desktop on Windows machines. Here’s an updated summary of the general steps for Windows installation, including these prerequisites and the links you provided:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Enable Virtualization from BIOS}: Before installing Docker Desktop, ensure that virtualization is enabled in your system’s BIOS settings. This step is crucial for Docker Desktop to function properly on Windows machines. Refer to this link for instructions on how to enable virtualization: {[}Hardware\sphinxhyphen{}Assisted Virtualization and Data Execution Protection{]}(\sphinxurl{https://forums.docker.com/t/hardware-assisted-virtualization-and-data-execution-protection-must-be-enabled-in-the-bios/109073}).

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Install Windows Subsystem for Linux (WSL)}: Docker Desktop relies on WSL to run Linux containers on Windows. Install WSL by following the instructions provided in this link: {[}Install Windows Subsystem for Linux (WSL){]}(\sphinxurl{https://learn.microsoft.com/en-us/windows/wsl/install}).

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Download Docker Desktop Installer}: Visit the official Docker website and navigate to the Windows installation page. From there, download the Docker Desktop installer executable.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Run the Installer}: After downloading the installer, double\sphinxhyphen{}click on it to launch the installation wizard.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Follow Installation Instructions}: Follow the on\sphinxhyphen{}screen instructions provided by the installation wizard. This includes accepting the license agreement, choosing installation options, and specifying the installation location.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{System Requirements Check}: During the installation process, Docker Desktop may perform a system requirements check to ensure your system meets the necessary prerequisites for installation.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Enable Hyper\sphinxhyphen{}V (if required)}: Docker Desktop for Windows may require Hyper\sphinxhyphen{}V to be enabled. (It can also work with WSL) If it’s not already enabled, the installer will prompt you to enable it. This step might require a system reboot.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Configuration}: Once the installation is complete, Docker Desktop may require additional configuration, such as configuring shared drives or network settings.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Launch Docker Desktop}: After successful installation and configuration, Docker Desktop can be launched from the Start menu or desktop shortcut.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Sign in (if required)}: Depending on your Docker configuration, you may need to sign in to your Docker account during the initial setup. Sign\sphinxhyphen{}in is usually optional.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Verify Installation}: To ensure Docker Desktop is installed correctly, you can open a command prompt or PowerShell window and run \sphinxtitleref{docker \textendash{}version} to verify the Docker CLI version.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Start Using Docker}: With Docker Desktop installed and running, you’re ready to start building, running, and managing containers on your Windows system. To use Docker CLI, users will have to start Docker Desktop.

\end{enumerate}

\sphinxAtStartPar
By following these steps, including enabling virtualization from the BIOS and installing WSL, you can successfully install Docker Desktop on your Windows machine and leverage the benefits of containerization for your development projects.


\paragraph{Enable Virtualization for Windows Machine}
\label{\detokenize{desktop:enable-virtualization-for-windows-machine}}
\sphinxAtStartPar
Accessing the BIOS (Basic Input/Output System) varies slightly depending on your computer’s manufacturer and model. Here’s a general guide on how to access the BIOS on most Windows computers:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Shut Down Your Computer}: Ensure that your computer is fully powered off, not just in sleep or hibernate mode.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Start Your Computer}: Press the power button to turn on your computer.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Start Tapping the BIOS Key}: Immediately after pressing the power button, start tapping the appropriate key to enter the BIOS. The BIOS key varies depending on your computer’s manufacturer. Common keys include:
\sphinxhyphen{} \sphinxstylestrong{F2}
\sphinxhyphen{} \sphinxstylestrong{F10}
\sphinxhyphen{} \sphinxstylestrong{F12}
\sphinxhyphen{} \sphinxstylestrong{Esc}
\sphinxhyphen{} \sphinxstylestrong{Delete}
\sphinxhyphen{} \sphinxstylestrong{Enter}

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Check for BIOS Key}: If you’re unsure which key to press, check your computer’s manual or the manufacturer’s website. Sometimes, the BIOS key is displayed briefly on the screen during startup.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Enter BIOS Setup}: Continuously tapping the BIOS key should bring you to the BIOS setup screen. This screen typically has a blue or black background with various options and settings.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Navigate BIOS Menu}: Once inside the BIOS setup, you can navigate using the arrow keys on your keyboard. Be cautious when making changes in the BIOS, as incorrect settings can affect the stability and performance of your computer.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Enable Virtualization}: Look for settings related to virtualization (e.g., Intel Virtualization Technology, AMD\sphinxhyphen{}V) in the BIOS setup. Depending on your BIOS version and layout, virtualization settings may be located under different menus such as “Advanced,” “Security,” or “CPU Configuration.” Enable virtualization if it’s disabled.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Save and Exit}: After making changes, save your settings and exit the BIOS setup. This process is usually done by pressing the appropriate key (often labeled as “Save \& Exit” or similar) and confirming your choice.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Restart Your Computer}: Once you’ve exited the BIOS setup, your computer will restart.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Verify Virtualization}: After restarting, you can verify if virtualization is enabled by checking your computer’s system information or BIOS settings.

\end{enumerate}

\sphinxAtStartPar
Remember, accessing the BIOS can vary depending on your computer’s manufacturer and model, so if you’re unsure, refer to your computer’s manual or the manufacturer’s website for specific instructions.


\paragraph{Installing WSL}
\label{\detokenize{desktop:installing-wsl}}
\sphinxAtStartPar
To install Windows Subsystem for Linux (WSL) and manage its settings, follow these steps:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Install WSL}: Open PowerShell or Windows Command Prompt as an administrator and run the command ‘’wsl \textendash{}install’’. This command enables the necessary features to run WSL and installs the default Ubuntu distribution of Linux. After running the command, restart your machine.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Check WSL Version}: To check which version of WSL you are running and view your installed Linux distributions, use the command ‘’wsl \sphinxhyphen{}l \sphinxhyphen{}v’’ in PowerShell or Command Prompt.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Set Default WSL Version}: If you want to set the default version to WSL 1 or WSL 2, use the command ‘’wsl \textendash{}set\sphinxhyphen{}default\sphinxhyphen{}version \textless{}Version\#\textgreater{}’’, replacing \sphinxtitleref{\textless{}Version\#\textgreater{}} with either 1 or 2.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Set Default Linux Distribution}: To set the default Linux distribution used with the ‘’wsl’’ command, enter ‘’wsl \sphinxhyphen{}s \textless{}DistributionName\textgreater{}’’ or ‘’wsl \textendash{}set\sphinxhyphen{}default \textless{}DistributionName\textgreater{}’’, replacing ‘’\textless{}DistributionName\textgreater{}’’ with the name of the Linux distribution you want to use.

\end{enumerate}

\sphinxAtStartPar
Following these steps allows you to easily install and manage Windows Subsystem for Linux (WSL) on your Windows machine, enabling you to run Linux commands and utilities alongside your Windows environment.


\paragraph{Installation in Linux}
\label{\detokenize{desktop:installation-in-linux}}
\sphinxAtStartPar
In general, Docker Engine can be installed on Ubuntu Linux using the instructions provided in the official Docker documentation at \sphinxurl{https://docs.docker.com/engine/install/ubuntu/}. This documentation outlines the steps necessary to install Docker Engine on an Ubuntu system, ensuring that you have the latest version of Docker available for your use.
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
Set up Docker’s apt repository.

\end{enumerate}

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{c+c1}{\PYGZsh{} Add Docker\PYGZsq{}s official GPG key:}
sudo apt\PYGZhy{}get update
sudo apt\PYGZhy{}get install ca\PYGZhy{}certificates curl
sudo install \PYGZhy{}m \PYG{l+m}{0755} \PYGZhy{}d /etc/apt/keyrings
sudo curl \PYGZhy{}fsSL https://download.docker.com/linux/ubuntu/gpg \PYGZhy{}o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

\PYG{c+c1}{\PYGZsh{} Add the repository to Apt sources:}
\PYG{n+nb}{echo} \PYG{l+s+se}{\PYGZbs{}}
  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{deb [arch=}\PYG{k}{\PYGZdl{}(}dpkg \PYGZhy{}\PYGZhy{}print\PYGZhy{}architecture\PYG{k}{)}\PYG{l+s+s2}{ signed\PYGZhy{}by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \PYGZbs{}}
\PYG{l+s+s2}{  }\PYG{k}{\PYGZdl{}(}. /etc/os\PYGZhy{}release \PYG{o}{\PYGZam{}\PYGZam{}} \PYG{n+nb}{echo} \PYG{l+s+s2}{\PYGZdq{}}\PYG{n+nv}{\PYGZdl{}VERSION\PYGZus{}CODENAME}\PYG{l+s+s2}{\PYGZdq{}}\PYG{k}{)}\PYG{l+s+s2}{ stable}\PYG{l+s+s2}{\PYGZdq{}} \PYG{p}{|} \PYG{l+s+se}{\PYGZbs{}}
  sudo tee /etc/apt/sources.list.d/docker.list \PYGZgt{} /dev/null
sudo apt\PYGZhy{}get update
\end{sphinxVerbatim}
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{1}
\item {} 
\sphinxAtStartPar
To install the latest version, run:

\end{enumerate}

\begin{sphinxVerbatim}[commandchars=\\\{\}]
sudo apt\PYGZhy{}get install docker\PYGZhy{}ce docker\PYGZhy{}ce\PYGZhy{}cli containerd.io docker\PYGZhy{}buildx\PYGZhy{}plugin docker\PYGZhy{}compose\PYGZhy{}plugin
\end{sphinxVerbatim}
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{2}
\item {} 
\sphinxAtStartPar
Verify that the Docker Engine installation is successful by running the hello\sphinxhyphen{}world image.

\end{enumerate}

\begin{sphinxVerbatim}[commandchars=\\\{\}]
sudo docker run hello\PYGZhy{}world
\end{sphinxVerbatim}


\paragraph{Supported Operating Systems}
\label{\detokenize{desktop:supported-operating-systems}}
\sphinxAtStartPar
Docker Desktop is available for installation on the following operating systems:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Windows 10/11}: Docker Desktop is compatible with Windows 10 and Windows 11 operating systems. It leverages the native Hyper\sphinxhyphen{}V virtualization technology on Windows to run containers.

\end{enumerate}

\begin{sphinxadmonition}{warning}{Warning:}
\sphinxAtStartPar
To ensure NVIDIA GPU compatibility, please use the latest updated Windows 10 or Windows 11. When we tested it with Windows 10 on our machine (not with the latest patches), the code ran into memory errors. However, after updating to Windows 11, the software ran without issues.

\sphinxAtStartPar
More information can be found in the following links:
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxhref{https://github.com/NVIDIA/nvidia-container-toolkit/issues/226}{NVIDIA Container Toolkit Issue \#226}

\item {} 
\sphinxAtStartPar
\sphinxhref{https://forums.developer.nvidia.com/t/pinned-memory-size-problem/13740}{NVIDIA Developer Forum Thread}

\end{itemize}
\end{sphinxadmonition}
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{1}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Mac}: Docker Desktop is compatible with macOS, allowing Mac users to build and manage containers seamlessly using the Docker Desktop application.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Linux (Ubuntu Distro 22 and above)}: Docker Desktop is supported on Linux systems running Ubuntu distributions version 22 and above. It provides a convenient way for Linux users to utilize Docker containers within their development workflow.

\end{enumerate}

\begin{sphinxadmonition}{note}{Note:}
\sphinxAtStartPar
For Linux Ubuntu Distro 20, we can only install Docker Engine, which is sufficient for most cases.
\end{sphinxadmonition}

\sphinxstepscope


\subsubsection{Docker Engine}
\label{\detokenize{build:docker-engine}}\label{\detokenize{build::doc}}
\sphinxAtStartPar
Docker Engine is a powerful tool that simplifies the process of creating, deploying, and managing applications using containers. Here’s an introduction to Docker Engine and its basic functionalities:


\paragraph{What is Docker Engine?}
\label{\detokenize{build:what-is-docker-engine}}
\sphinxAtStartPar
Docker Engine is the core component of Docker, a platform that enables developers to package applications and their dependencies into lightweight containers. These containers can then be deployed consistently across different environments, whether it’s a developer’s laptop, a testing server, or a production system.


\paragraph{Basic Functionalities of Docker Engine}
\label{\detokenize{build:basic-functionalities-of-docker-engine}}\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Containerization:} Docker Engine allows you to create and manage containers, which are isolated environments that package an application and its dependencies. Containers ensure consistency in runtime environments across different platforms.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Image Management:} Docker uses images as templates to create containers. Docker Engine allows you to build, push, and pull images from Docker registries (like Docker Hub or private registries). Images are typically defined using a Dockerfile, which specifies the environment and setup instructions for the application.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Container Lifecycle Management:} Docker Engine provides commands to start, stop, restart, and remove containers. It also manages the lifecycle of containers, including monitoring their status and resource usage.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Networking:} Docker Engine facilitates networking between containers and between containers and the outside world. It provides mechanisms for containers to communicate with each other and with external networks, as well as configuring networking options like ports and IP addresses.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Storage Management:} Docker Engine manages storage volumes that persist data generated by containers. It supports various storage drivers and allows you to attach volumes to containers, enabling data persistence and sharing data between containers and the host system.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Resource Isolation and Utilization:} Docker Engine uses Linux kernel features (such as namespaces and control groups) to provide lightweight isolation and resource utilization for containers. This ensures that containers run efficiently without interfering with each other or with the host system.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Integration with Orchestration Tools:} Docker Engine can be integrated with orchestration tools like Docker Swarm and Kubernetes for managing containerized applications at scale. Orchestration tools automate container deployment, scaling, and load balancing across multiple hosts.

\end{enumerate}


\paragraph{Key Benefits of Docker Engine}
\label{\detokenize{build:key-benefits-of-docker-engine}}\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Consistency:} Docker ensures consistency between development, testing, and production environments by encapsulating applications and dependencies into containers.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Efficiency:} Containers are lightweight and share the host system’s kernel, reducing overhead and improving performance compared to traditional virtual machines.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Portability:} Docker containers can run on any platform that supports Docker, making it easy to move applications between different environments.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Isolation:} Containers provide a level of isolation that enhances security and stability, as each container operates independently of others on the same host.

\end{itemize}


\paragraph{Basic Steps to build Docker images}
\label{\detokenize{build:basic-steps-to-build-docker-images}}\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
Create a \sphinxstylestrong{Dockerfile} that provides instructions to build Docker image.

\end{enumerate}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{P4}.png}
\caption{Placing Dockerfile in the directory where we want to create Docker image}\label{\detokenize{build:id1}}\end{figure}

\sphinxAtStartPar
We can examine the contents of the Dockerfile.

\sphinxAtStartPar
We’re creating a Docker image by starting from an existing Docker image that includes a UNIX environment with CUDA runtime. Initially, we pull the base image from Docker’s official repository. Specifically, we can locate suitable base images by searching on \sphinxhref{https://hub.docker.com/search?q=nvidia\%2Fcuda}{Docker Hub} (\sphinxurl{https://hub.docker.com/search?q=nvidia\%2Fcuda}).

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{c+c1}{\PYGZsh{} \PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}}
\PYG{c+c1}{\PYGZsh{} Step 1 : Import a base image from online repository}
\PYG{c+c1}{\PYGZsh{} FROM nvidia/cuda:12.5.0\PYGZhy{}devel\PYGZhy{}ubuntu22.04}
FROM nvidia/cuda:12.4.0\PYGZhy{}devel\PYGZhy{}ubuntu22.04
\end{sphinxVerbatim}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{docker}.png}
\caption{Find base images online via \sphinxtitleref{Docker Hub \textless{}https://hub.docker.com/search?q=nvidia\%2Fcuda\textgreater{}}}\label{\detokenize{build:id2}}\end{figure}

\sphinxAtStartPar
In addition, setting \sphinxcode{\sphinxupquote{ENV DEBIAN\_FRONTEND=noninteractive}} in a Dockerfile is a directive that adjusts the environment variable \sphinxcode{\sphinxupquote{DEBIAN\_FRONTEND}} within the Docker container during the image build process.
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Non\sphinxhyphen{}interactive Environment}

\end{itemize}

\sphinxAtStartPar
Debian\sphinxhyphen{}based Linux distributions, including many Docker base images, use DEBIAN\_FRONTEND to determine how certain package management tools (like apt\sphinxhyphen{}get) interact with users.
Setting DEBIAN\_FRONTEND=noninteractive tells these tools to run in a non\sphinxhyphen{}interactive mode. In this mode, the tools assume default behavior for prompts that would normally require user input, such as during package installation or configuration.
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Avoiding User Prompts}

\end{itemize}

\sphinxAtStartPar
During Docker image builds, it’s crucial to automate as much as possible to ensure consistency and reproducibility.
Without setting DEBIAN\_FRONTEND=noninteractive, package installations might prompt for user input (e.g., to confirm installation, choose configuration options). This interaction halts the build process unless explicitly handled in advance.
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Common Usage in Dockerfiles}

\end{itemize}

\sphinxAtStartPar
In Dockerfiles, especially those designed for automated builds (CI/CD pipelines, batch processes), it’s typical to include ENV DEBIAN\_FRONTEND=noninteractive early on. This ensures that subsequent commands relying on package management tools proceed without waiting for user input.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{c+c1}{\PYGZsh{} \PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}}
\PYG{c+c1}{\PYGZsh{} Step 2 : Suppress Interactive Prompts from Debian}
ENV \PYG{n+nv}{DEBIAN\PYGZus{}FRONTEND}\PYG{o}{=}noninteractive
\end{sphinxVerbatim}

\sphinxAtStartPar
Next, we will need to install packages, libraries and set the environment variables that we need to compile or run Maxwell\sphinxhyphen{}TD.

\sphinxAtStartPar
his Dockerfile snippet outlines steps for setting up a Docker image with various libraries and tools typically required for scientific computing and development environments. Let’s break down each part:
\begin{itemize}
\item {} \begin{description}
\sphinxlineitem{\sphinxstylestrong{Update system and install libraries}}\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Purpose}: Updates the package list and installs a set of essential libraries and tools required for compiling and building various applications.

\item {} \begin{description}
\sphinxlineitem{\sphinxstylestrong{Packages Installed}:}\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{build\sphinxhyphen{}essential, g++, gcc}: Compiler tools and libraries.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{cmake, gfortran}: Build and Fortran compiler.

\item {} 
\sphinxAtStartPar
Various development libraries (libopenblas\sphinxhyphen{}dev, liblapack\sphinxhyphen{}dev, libfftw3\sphinxhyphen{}dev, etc.) for numerical computations, linear algebra, and scientific computing.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{libvtk7\sphinxhyphen{}dev}: Libraries for 3D computer graphics, visualization, and image processing.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{libgomp1, libomp\sphinxhyphen{}dev, libpthread\sphinxhyphen{}stubs0\sphinxhyphen{}dev}: Libraries for multi\sphinxhyphen{}threading support.

\end{itemize}

\end{description}

\end{itemize}

\end{description}

\item {} \begin{description}
\sphinxlineitem{\sphinxstylestrong{Install Compilers}}
\sphinxAtStartPar
\sphinxhyphen{}\sphinxstylestrong{Purpose}: Ensures that g++ and gcc are installed. These are essential compilers for C++ and C programming languages, often needed for compiling native code.

\end{description}

\item {} \begin{description}
\sphinxlineitem{\sphinxstylestrong{Install Python and pip}}
\sphinxAtStartPar
\sphinxhyphen{}\sphinxstylestrong{Purpose}: Installs Python 3 and pip (Python package installer), which are essential for Python\sphinxhyphen{}based applications and managing Python dependencies.

\end{description}

\item {} \begin{description}
\sphinxlineitem{\sphinxstylestrong{Copy current directory to docker image}}
\sphinxAtStartPar
\sphinxhyphen{}\sphinxstylestrong{Purpose}:  Sets the working directory inside the Docker image to \sphinxcode{\sphinxupquote{/dgtd}} and copies all files from the current directory (presumably where the Dockerfile resides) into the \sphinxcode{\sphinxupquote{/dgtd}} directory inside the Docker image.

\end{description}

\item {} \begin{description}
\sphinxlineitem{\sphinxstylestrong{Install Python dependencies}}
\sphinxAtStartPar
\sphinxhyphen{}\sphinxstylestrong{Purpose}:  Installs Python dependencies listed in \sphinxcode{\sphinxupquote{requirements.txt}} file located in the /dgtd directory. The \sphinxcode{\sphinxupquote{\sphinxhyphen{}\sphinxhyphen{}no\sphinxhyphen{}cache\sphinxhyphen{}dir}} flag ensures that no cached packages are used during installation, which can be important for Docker images to maintain consistency and avoid unexpected behavior.

\end{description}

\item {} \begin{description}
\sphinxlineitem{\sphinxstylestrong{Set Path for libraries and CUDA}}
\sphinxAtStartPar
\sphinxhyphen{}\sphinxstylestrong{Purpose}: Sets environment variables related to CUDA (a parallel computing platform and programming model) if CUDA is used in the project. These variables define paths to CUDA libraries, binaries, headers, and compiler (\sphinxcode{\sphinxupquote{nvcc}}).

\end{description}

\end{itemize}

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{c+c1}{\PYGZsh{} \PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}}
\PYG{c+c1}{\PYGZsh{} Step 3 : Installing required packages and setting up environment variables}

\PYG{c+c1}{\PYGZsh{} Update system and install libraries}
RUN apt\PYGZhy{}get update \PYG{o}{\PYGZam{}\PYGZam{}} apt\PYGZhy{}get install \PYGZhy{}y \PYG{l+s+se}{\PYGZbs{}}
        build\PYGZhy{}essential \PYG{l+s+se}{\PYGZbs{}}
        cmake \PYG{l+s+se}{\PYGZbs{}}
        gfortran \PYG{l+s+se}{\PYGZbs{}}
        libopenblas\PYGZhy{}dev \PYG{l+s+se}{\PYGZbs{}}
        liblapack\PYGZhy{}dev \PYG{l+s+se}{\PYGZbs{}}
        libfftw3\PYGZhy{}dev \PYG{l+s+se}{\PYGZbs{}}
        libmetis\PYGZhy{}dev \PYG{l+s+se}{\PYGZbs{}}
        libvtk7\PYGZhy{}dev \PYG{l+s+se}{\PYGZbs{}}
        libgomp1 \PYG{l+s+se}{\PYGZbs{}}
        libomp\PYGZhy{}dev \PYG{l+s+se}{\PYGZbs{}}
        libblas\PYGZhy{}dev \PYG{l+s+se}{\PYGZbs{}}
        libpthread\PYGZhy{}stubs0\PYGZhy{}dev \PYG{l+s+se}{\PYGZbs{}}
        \PYG{o}{\PYGZam{}\PYGZam{}} rm \PYGZhy{}rf /var/lib/apt/lists/*

\PYG{c+c1}{\PYGZsh{} Install Compilers}
RUN apt\PYGZhy{}get update \PYG{o}{\PYGZam{}\PYGZam{}} apt\PYGZhy{}get install \PYGZhy{}y g++ gcc

\PYG{c+c1}{\PYGZsh{} Install Python and pip}
RUN apt\PYGZhy{}get install \PYGZhy{}y python3 python3\PYGZhy{}pip

\PYG{c+c1}{\PYGZsh{} Copy current directory to docker image}
WORKDIR dgtd
COPY . .

\PYG{c+c1}{\PYGZsh{} Install Python dependencies}
RUN pip install \PYGZhy{}\PYGZhy{}no\PYGZhy{}cache\PYGZhy{}dir \PYGZhy{}v \PYGZhy{}r /dgtd/requirements.txt


\PYG{c+c1}{\PYGZsh{} Set Path for libraries and CUDA}
ENV CUDA\PYGZus{}HOME /usr/local/cuda
ENV LD\PYGZus{}LIBRARY\PYGZus{}PATH \PYG{l+s+si}{\PYGZdl{}\PYGZob{}}\PYG{n+nv}{CUDA\PYGZus{}HOME}\PYG{l+s+si}{\PYGZcb{}}/lib64
ENV PATH \PYG{l+s+si}{\PYGZdl{}\PYGZob{}}\PYG{n+nv}{CUDA\PYGZus{}HOME}\PYG{l+s+si}{\PYGZcb{}}/:bin:\PYG{l+s+si}{\PYGZdl{}\PYGZob{}}\PYG{n+nv}{PATH}\PYG{l+s+si}{\PYGZcb{}}
ENV CPATH \PYG{l+s+si}{\PYGZdl{}\PYGZob{}}\PYG{n+nv}{CUDA\PYGZus{}HOME}\PYG{l+s+si}{\PYGZcb{}}/include:\PYG{l+s+si}{\PYGZdl{}\PYGZob{}}\PYG{n+nv}{CPATH}\PYG{l+s+si}{\PYGZcb{}}
ENV CUDACXX \PYG{l+s+si}{\PYGZdl{}\PYGZob{}}\PYG{n+nv}{CUDA\PYGZus{}HOME}\PYG{l+s+si}{\PYGZcb{}}/bin/nvcc
\end{sphinxVerbatim}

\sphinxAtStartPar
Finally, we can compile a program using cmake and make, and then sets up the Docker container to start a Bash shell upon running. \sphinxcode{\sphinxupquote{CMD {[}"bash"{]}}} sets the default command to run inside the container. When the container is started without specifying a command, it will automatically launch a Bash shell.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{c+c1}{\PYGZsh{} \PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}}
\PYG{c+c1}{\PYGZsh{} Step 4 : Compiling Program}
RUN ls \PYGZhy{}l \PYG{o}{\PYGZam{}\PYGZam{}} mkdir build \PYG{o}{\PYGZam{}\PYGZam{}} \PYG{n+nb}{cd} build \PYG{o}{\PYGZam{}\PYGZam{}} cmake .. \PYG{o}{\PYGZam{}\PYGZam{}} make \PYGZhy{}j \PYG{l+m}{4}
CMD \PYG{o}{[}\PYG{l+s+s2}{\PYGZdq{}bash\PYGZdq{}}\PYG{o}{]}
\end{sphinxVerbatim}
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{1}
\item {} 
\sphinxAtStartPar
Use the \sphinxcode{\sphinxupquote{docker build}} command to build the Docker image from your Dockerfile.

\end{enumerate}

\sphinxAtStartPar
Once you have created your Dockerfile and saved it in your project directory, you can build a Docker image using the docker build command. Here’s how you would do it:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker build \PYGZhy{}t maxwell\PYGZus{}td\PYGZus{}image .
\end{sphinxVerbatim}
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{docker build}}: This command tells Docker to build an image from a Dockerfile.

\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{\sphinxhyphen{}t maxwell\_td\_image}}: The \sphinxhyphen{}t flag is used to tag the image with a name (maxwell\_td\_image in this case). This name can be whatever you choose and is used to refer to this specific image later on.

\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{.}}: This specifies the build context. The dot indicates that the Dockerfile and any other files needed for building the image are located in the current directory.

\end{itemize}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{P7}.png}
\caption{Run docker build to build Docker image}\label{\detokenize{build:id3}}\end{figure}


\paragraph{How to check images}
\label{\detokenize{build:how-to-check-images}}
\sphinxAtStartPar
To verify if a Docker image has been successfully built on your local system, you can use the docker images command. Here’s how you can do it:
\begin{itemize}
\item {} 
\sphinxAtStartPar
Open your terminal (Command Prompt on Windows or Terminal on macOS/Linux).

\item {} 
\sphinxAtStartPar
Run the following command

\end{itemize}

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker images
docker images ls
\end{sphinxVerbatim}

\sphinxAtStartPar
This command will list all Docker images that are currently present on your local system.
Each image listed will have columns showing its repository, tag, image ID, creation date, and size.
\begin{itemize}
\item {} 
\sphinxAtStartPar
Finding your image

\end{itemize}

\sphinxAtStartPar
Look through the list for the image you just built. If it was successfully built, it should appear in the list.
Check the repository and tag names to identify your specific image. The repository name will likely be the name you assigned to it in your Dockerfile, and the tag will be latest or another tag you specified.
\begin{itemize}
\item {} 
\sphinxAtStartPar
Confirming successful build

\end{itemize}

\sphinxAtStartPar
If your image appears in the list with the correct details (repository name, tag, etc.), it indicates that Docker successfully built and stored the image on your local machine.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{P8}.png}
\caption{Check Docker image}\label{\detokenize{build:id4}}\end{figure}


\paragraph{How to save built image locally}
\label{\detokenize{build:how-to-save-built-image-locally}}
\sphinxAtStartPar
To save a Docker image locally as a tar archive, you’ll use the docker save command. This command packages the Docker image into a tarball archive that can be transferred to other machines or stored for backup purposes. Here’s how you can do it:
\begin{itemize}
\item {} 
\sphinxAtStartPar
Open your terminal (Command Prompt on Windows or Terminal on macOS/Linux).

\item {} 
\sphinxAtStartPar
Run the following command

\end{itemize}

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker save \PYGZhy{}o \PYGZlt{}output\PYGZhy{}file\PYGZhy{}name\PYGZgt{}.zip \PYGZlt{}image\PYGZhy{}name\PYGZgt{}
\end{sphinxVerbatim}

\sphinxAtStartPar
Replace \sphinxcode{\sphinxupquote{\textless{}output\sphinxhyphen{}file\sphinxhyphen{}name\textgreater{}.zip}} with the desired name for your zip archive file.

\sphinxAtStartPar
\textless{}image\sphinxhyphen{}name\textgreater{}: This specifies the Docker image you want to save.
\begin{itemize}
\item {} 
\sphinxAtStartPar
Confirmation:

\end{itemize}

\sphinxAtStartPar
After running the command, Docker will package the specified image into zip named \textless{}output\sphinxhyphen{}file\sphinxhyphen{}name\textgreater{}.zip.
You should see the zipfile ( \textless{}output\sphinxhyphen{}file\sphinxhyphen{}name\textgreater{}.zip) in your current directory unless you specified a different path for the output.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{P9}.png}
\caption{Save Docker image}\label{\detokenize{build:id5}}\end{figure}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{P10}.png}
\caption{Resulting zipped Docker image}\label{\detokenize{build:id6}}\end{figure}

\begin{sphinxadmonition}{note}{Note:}\begin{itemize}
\item {} 
\sphinxAtStartPar
Transportability: The generated zip can be transferred to another machine or stored for future use. This is useful for deploying Docker images across different environments without needing to rebuild them.

\item {} 
\sphinxAtStartPar
File Size: Depending on the size of your Docker image, the resulting zip archive can be quite large. Ensure you have enough disk space and consider compression techniques if transferring over networks with limited bandwidth.

\item {} 
\sphinxAtStartPar
Loading the Image: To use the saved zip file on another machine, you’ll need to load it into Docker using the docker load command. Here’s how you can do that:

\end{itemize}

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker load \PYGZhy{}i \PYGZlt{}path/to/your/image.tar\PYGZgt{}
\end{sphinxVerbatim}

\sphinxAtStartPar
Replace \textless{}path/to/your/image.tar\textgreater{} with the actual path to your saved tar archive file.
\end{sphinxadmonition}


\paragraph{Managing Docker Resources}
\label{\detokenize{build:managing-docker-resources}}
\sphinxAtStartPar
\sphinxstylestrong{Cleaning Up Unused Resources}

\sphinxAtStartPar
To clean up any dangling resources (images, containers, volumes, networks), use the following command:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker system prune
\end{sphinxVerbatim}

\sphinxAtStartPar
To remove stopped containers and all unused images (not just dangling), add the \sphinxtitleref{\sphinxhyphen{}a} flag:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker system prune \PYGZhy{}a
\end{sphinxVerbatim}

\sphinxAtStartPar
\sphinxstylestrong{Removing Docker Images}

\sphinxAtStartPar
To remove specific images, list them using \sphinxcode{\sphinxupquote{docker images \sphinxhyphen{}a}} and then delete them with \sphinxcode{\sphinxupquote{docker rmi}}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker images \PYGZhy{}a             \PYG{c+c1}{\PYGZsh{} List all images}
docker rmi Image Image       \PYG{c+c1}{\PYGZsh{} Remove specific images by ID or tag}
\end{sphinxVerbatim}

\sphinxAtStartPar
To remove dangling images, use:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker image prune
\end{sphinxVerbatim}

\sphinxAtStartPar
\sphinxstylestrong{Removing Docker Containers}

\sphinxAtStartPar
To remove specific containers, list them using \sphinxcode{\sphinxupquote{docker ps \sphinxhyphen{}a}} and then delete them with \sphinxcode{\sphinxupquote{docker rm}}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker ps \PYGZhy{}a                 \PYG{c+c1}{\PYGZsh{} List all containers}
docker rm ID\PYGZus{}or\PYGZus{}Name ID\PYGZus{}or\PYGZus{}Name  \PYG{c+c1}{\PYGZsh{} Remove specific containers by ID or name}
\end{sphinxVerbatim}

\sphinxAtStartPar
To remove all exited containers, use:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker rm \PYG{k}{\PYGZdl{}(}docker ps \PYGZhy{}a \PYGZhy{}f \PYG{n+nv}{status}\PYG{o}{=}exited \PYGZhy{}q\PYG{k}{)}
\end{sphinxVerbatim}

\sphinxAtStartPar
\sphinxstylestrong{Removing Docker Volumes}

\sphinxAtStartPar
To remove specific volumes, list them using \sphinxtitleref{docker volume ls} and then delete them with \sphinxtitleref{docker volume rm}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker volume ls             \PYG{c+c1}{\PYGZsh{} List all volumes}
docker volume rm volume\PYGZus{}name volume\PYGZus{}name  \PYG{c+c1}{\PYGZsh{} Remove specific volumes by name}
\end{sphinxVerbatim}

\sphinxAtStartPar
To remove dangling volumes, use:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
docker volume prune
\end{sphinxVerbatim}

\sphinxstepscope


\subsubsection{User Manual (Windows System)}
\label{\detokenize{Manual:user-manual-windows-system}}\label{\detokenize{Manual::doc}}

\paragraph{Step\sphinxhyphen{}by\sphinxhyphen{}Step installation in Windows}
\label{\detokenize{Manual:step-by-step-installation-in-windows}}
\sphinxAtStartPar
Welcome to the user manual for setting up and using Docker on a Windows system. This guide will provide comprehensive instructions to help you install and configure Docker Desktop on Windows, activate virtualization in BIOS, install WSL (Windows Subsystem for Linux), import Docker images, mount user data, and run Docker containers. Additionally, it includes pointers and tips to address common questions and issues that users may encounter.


\paragraph{Activate Virtualization in BIOS}
\label{\detokenize{Manual:activate-virtualization-in-bios}}
\sphinxAtStartPar
To enable virtualization, you’ll need to access the BIOS settings during startup. Here’s how:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
Power on your computer.

\item {} 
\sphinxAtStartPar
Keep an eye on the initial boot screen.

\item {} 
\sphinxAtStartPar
When you see the screen, press the \sphinxcode{\sphinxupquote{F2 / F10 / F12 / Esc / Delete / Enter}} key to enter the BIOS settings.

\end{enumerate}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=900\sphinxpxdimen]{{B1}.jpg}
\caption{Screen when we boot up the machine. Press \sphinxcode{\sphinxupquote{F2 / F10 / F12 / Esc / Delete / Enter}}}\label{\detokenize{Manual:id1}}\end{figure}

\sphinxAtStartPar
Once inside the BIOS settings:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{3}
\item {} 
\sphinxAtStartPar
Navigate through the BIOS menus using the arrow keys. Look for the section typically labeled \sphinxcode{\sphinxupquote{Advanced}}, \sphinxcode{\sphinxupquote{Advanced Settings}} or \sphinxcode{\sphinxupquote{CPU Configuration}}.

\end{enumerate}

\sphinxAtStartPar
or
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{3}
\item {} 
\sphinxAtStartPar
Alternatively, some BIOS versions allow you to search for settings. Look for a search bar or a similar feature where you can type \sphinxcode{\sphinxupquote{virtualization}} or \sphinxcode{\sphinxupquote{VT\sphinxhyphen{}x}} (for Intel processors) / \sphinxcode{\sphinxupquote{AMD\sphinxhyphen{}V}} (for AMD processors).

\end{enumerate}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=900\sphinxpxdimen]{{B3}.jpg}
\caption{BIOS settings screen.}\label{\detokenize{Manual:id2}}\end{figure}

\sphinxAtStartPar
Once you locate the virtualization options within these sections, you can proceed to enable them. This step is crucial for utilizing virtualization features such as running virtual machines or other virtualization\sphinxhyphen{}based applications on your computer. After making the necessary changes, remember to save your settings and exit the BIOS.
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{4}
\item {} 
\sphinxAtStartPar
Change the setting from \sphinxcode{\sphinxupquote{Disabled}} to \sphinxcode{\sphinxupquote{Enabled}} using the appropriate key (usually \sphinxcode{\sphinxupquote{Enter}} or the \sphinxcode{\sphinxupquote{+}} key).

\item {} 
\sphinxAtStartPar
Save changes and exit BIOS

\end{enumerate}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=900\sphinxpxdimen]{{B2}.jpg}
\caption{Turn on Virtualization.}\label{\detokenize{Manual:id3}}\end{figure}

\sphinxAtStartPar
Your computer will restart with virtualization support enabled.


\paragraph{Install WSL}
\label{\detokenize{Manual:install-wsl}}
\sphinxAtStartPar
Here are the simplified instructions for installing Windows Subsystem for Linux (WSL) and verifying its installation:

\sphinxAtStartPar
\sphinxstylestrong{Installing Windows Subsystem for Linux (WSL)}
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Open PowerShell as Administrator}

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Install WSL:}
Run the following command to install WSL: \sphinxcode{\sphinxupquote{wsl \sphinxhyphen{}\sphinxhyphen{}install}}.
Follow any prompts or confirmations that appear during the installation process.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Wait for Installation to Complete:}
Allow the installation process to finish. This may take some time depending on your internet speed.

\end{enumerate}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W3}.png}
\caption{Install Windows Subsystem for Linux (WSL)}\label{\detokenize{Manual:id4}}\end{figure}
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{3}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Check WSL Version:}
Run the following command to check the installed WSL versions and their respective distributions: \sphinxcode{\sphinxupquote{wsl \sphinxhyphen{}l \sphinxhyphen{}v}}
This command lists all installed Linux distributions and their associated WSL versions (\sphinxtitleref{1} or \sphinxtitleref{2}).

\end{enumerate}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W4}.png}
\caption{Check if WSL is properly installed}\label{\detokenize{Manual:id5}}\end{figure}

\sphinxAtStartPar
Following these steps ensures that you install Windows Subsystem for Linux (WSL) and confirm its proper installation on your Windows system.


\paragraph{Install Docker Desktop in Windows}
\label{\detokenize{Manual:install-docker-desktop-in-windows}}\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
Download Docker Desktop from \sphinxhref{https://www.docker.com/get-started/}{Docker’s official website} (\sphinxurl{https://www.docker.com/get-started/}).

\end{enumerate}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W5}.png}
\caption{Download Docker Desktop online}\label{\detokenize{Manual:id6}}\end{figure}
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{1}
\item {} 
\sphinxAtStartPar
Once downloaded, locate the installer file (e.g., \sphinxcode{\sphinxupquote{DockerDesktopInstaller.exe}}) and double\sphinxhyphen{}click to launch it.

\item {} 
\sphinxAtStartPar
Follow the prompts provided by the Docker Desktop installer to complete the installation process. This may involve accepting terms and conditions and choosing installation preferences.

\end{enumerate}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W6}.png}
\caption{Docker Desktop Installer}\label{\detokenize{Manual:id7}}\end{figure}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W7}.png}
\caption{Installing Docker Desktop}\label{\detokenize{Manual:id8}}\end{figure}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W8}.png}
\caption{Finish installing Docker Desktop}\label{\detokenize{Manual:id9}}\end{figure}
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{3}
\item {} 
\sphinxAtStartPar
After installation, a Docker Desktop shortcut will appear on your desktop. The necessary components to run Maxwell\sphinxhyphen{}TD Docker images include Docker Desktop itself, Windows PowerShell for running CLI commands, and a designated working folder containing Docker images and user data (e.g., geometry information).

\end{enumerate}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=300\sphinxpxdimen]{{W9}.png}
\caption{All the data/folders/apps needed to run Maxwell\sphinxhyphen{}TD Docker image}\label{\detokenize{Manual:id10}}\end{figure}
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{4}
\item {} 
\sphinxAtStartPar
Launch Docker Desktop by double\sphinxhyphen{}clicking the Docker Desktop shortcut on your desktop.

\item {} 
\sphinxAtStartPar
Upon first launch, Docker Desktop may prompt you to accept terms and conditions. Agree to proceed with using the application.

\end{enumerate}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W10}.png}
\caption{Accept the terms and conditions}\label{\detokenize{Manual:id11}}\end{figure}
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\setcounter{enumi}{6}
\item {} 
\sphinxAtStartPar
You can continue without logging into Docker Desktop if prompted, and optionally skip any survey presented during initial setup.

\end{enumerate}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W11}.png}
\caption{Continue without logging in}\label{\detokenize{Manual:id12}}\end{figure}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W12}.png}
\caption{Skip Survey}\label{\detokenize{Manual:id13}}\end{figure}

\sphinxAtStartPar
Currently, the local repository in Docker Desktop is empty. To proceed, we must upload the compiled image for Maxwell\sphinxhyphen{}TD. This requires using the PowerShell console, as the GUI does not support managing local Docker images directly and defaults to searching online repositories for Docker images.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W13}.png}
\caption{Image local Repository}\label{\detokenize{Manual:id14}}\end{figure}


\paragraph{Import Docker Image}
\label{\detokenize{Manual:import-docker-image}}
\sphinxAtStartPar
Next, we need to mount the zipped Docker image onto the Windows system. Since this action cannot be performed using the Docker Desktop GUI, we’ll need to use the console terminal instead.

\sphinxAtStartPar
In the designated working folder, you will find a zipped Docker image file and an “examples” folder containing user\sphinxhyphen{}defined data.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W14}.png}
\caption{Location of Maxwell\sphinxhyphen{}TD Docker Image (Zipped)}\label{\detokenize{Manual:id15}}\end{figure}

\sphinxAtStartPar
To load the Docker image, execute the command \sphinxcode{\sphinxupquote{docker load \sphinxhyphen{}\sphinxhyphen{}input \textless{}PATH to zipped docker image\textgreater{}}}. This process will take some time, and you can verify its completion by using \sphinxcode{\sphinxupquote{docker images}} in the console.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W16}.png}
\caption{Load and check Docker Image}\label{\detokenize{Manual:id16}}\end{figure}

\sphinxAtStartPar
The loaded Docker image will also be visible both in Docker Desktop.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W17}.png}
\caption{Loaded Docker Image can be seen in Docker Desktop}\label{\detokenize{Manual:id17}}\end{figure}


\paragraph{Mounting User data and running Docker image}
\label{\detokenize{Manual:mounting-user-data-and-running-docker-image}}
\sphinxAtStartPar
Finally, we are ready to run the Docker image. You can use a PowerShell script with administrative privileges to execute the Docker image. We have prepared a script file named \sphinxcode{\sphinxupquote{runDocker.ps1}} that can be executed in the console terminal.

\sphinxAtStartPar
To run the script and start the Docker image, follow these steps:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Open PowerShell as Administrator}

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Navigate to Script Directory:}
Use the \sphinxcode{\sphinxupquote{cd}} command to navigate to the directory where \sphinxcode{\sphinxupquote{runDocker.ps1}} is located.

\item {} \begin{description}
\sphinxlineitem{\sphinxstylestrong{Execute the Script:}}\begin{itemize}
\item {} 
\sphinxAtStartPar
Run the script by typing \sphinxcode{\sphinxupquote{.\textbackslash{}runDocker.ps1}} and press \sphinxcode{\sphinxupquote{Enter}}.

\item {} 
\sphinxAtStartPar
The script will mount the folder containing user\sphinxhyphen{}defined data into the Docker Server environment.

\end{itemize}

\end{description}

\end{enumerate}

\begin{sphinxadmonition}{note}{Note:}\begin{itemize}
\item {} 
\sphinxAtStartPar
When running the Docker image, any data saved onto the mounted filesystem will persist. However, other modifications, such as custom installations of packages, will be temporary and will disappear after you exit the Docker session.

\item {} 
\sphinxAtStartPar
Treat the Docker image as a saved state of a customized environment.

\end{itemize}
\end{sphinxadmonition}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W18}.png}
\caption{Use PowerShell Script to run Docker Image}\label{\detokenize{Manual:id18}}\end{figure}

\sphinxAtStartPar
Let’s break down the lines in the PowerShell script to understand the necessary steps for running the Docker image. This will clarify what is needed for execution.
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{\$imageName}:

\end{itemize}

\sphinxAtStartPar
This variable defines the name of the Docker image that you want to run. In this case, it is set to \sphinxcode{\sphinxupquote{maxwell\_td\_image}}. Users should not change this variable if they intend to run Maxwell\sphinxhyphen{}TD.
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{\$containerName}:

\end{itemize}

\sphinxAtStartPar
This variable specifies the name of the container that will run the Docker image. You can run multiple containers from the same image concurrently, so each running instance needs a unique name. Users can customize this variable to suit their naming conventions.
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{\$hostVolumePath}:

\end{itemize}

\sphinxAtStartPar
This variable holds the path to the working folder on the Windows system. This folder contains essential files such as geometry files for simulation models and scripts for setting simulation parameters. Users must update this path to point to their specific working folder.
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{\$containerVolumePath}:

\end{itemize}

\sphinxAtStartPar
This variable defines the path within the Docker container (running on Linux environment) where the host volume (\sphinxstylestrong{\$hostVolumePath}) will be mounted. In this script, it is set to \sphinxcode{\sphinxupquote{/dgtd/model/}}. It is recommended that users do not change this variable unless necessary, to ensure compatibility with the Docker image’s expected mount point.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W20}.png}
\caption{User\sphinxhyphen{}defined parameters to change location of User data}\label{\detokenize{Manual:id19}}\end{figure}

\sphinxAtStartPar
Next, the script proceeds to execute several commands to display the paths and names. It also checks the CUDA version installed on the Windows device. Afterward, it runs the Docker command \sphinxcode{\sphinxupquote{docker run \sphinxhyphen{}\sphinxhyphen{}rm \sphinxhyphen{}\sphinxhyphen{}gpus all \sphinxhyphen{}it \sphinxhyphen{}\sphinxhyphen{}name \$\{containerName\} \sphinxhyphen{}v \$\{hostVolumePath\}:\$\{containerVolumePath\} \$\{imageName\}}}.
\begin{description}
\sphinxlineitem{\sphinxstylestrong{Explanation of Docker Command Flags}}\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{docker run}}: This command starts a new Docker container.

\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{\sphinxhyphen{}\sphinxhyphen{}rm}}: Automatically removes the container when it exits. Useful for temporary containers.

\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{\sphinxhyphen{}\sphinxhyphen{}gpus all}}: Enables access to all GPUs in the container.

\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{\sphinxhyphen{}it}}: Allocates a pseudo\sphinxhyphen{}TTY and keeps stdin open. Allows interactive terminal access.

\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{\sphinxhyphen{}\sphinxhyphen{}name \$\{containerName\}}}: Assigns a name to the container instance based on the value stored in the \sphinxcode{\sphinxupquote{\$containerName}} variable.

\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{\sphinxhyphen{}v \$\{hostVolumePath\}:\$\{containerVolumePath\}}}: Mounts a volume from the host machine (Windows) into the Docker container. \sphinxcode{\sphinxupquote{\$\{hostVolumePath\}}} is the path on the host system, and \sphinxcode{\sphinxupquote{\$\{containerVolumePath\}}} is the path inside the container where the volume will be mounted.

\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{\$\{imageName\}}}: Specifies the Docker image to use for creating the container.

\end{itemize}

\sphinxlineitem{\sphinxstylestrong{Additional Information}}\begin{itemize}
\item {} 
\sphinxAtStartPar
The \sphinxcode{\sphinxupquote{\sphinxhyphen{}\sphinxhyphen{}rm}} flag ensures that the container is automatically removed after it stops running, helping to manage resources efficiently.

\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{\sphinxhyphen{}\sphinxhyphen{}gpus all}} allows the Docker container to access all available GPUs on the host machine, which is crucial for applications that require GPU acceleration.

\item {} 
\sphinxAtStartPar
\sphinxcode{\sphinxupquote{\sphinxhyphen{}it}} enables interactive mode with a terminal session, which is useful for interacting directly with the container if needed.

\end{itemize}

\end{description}

\sphinxAtStartPar
This Docker command, when executed within the PowerShell script, sets up and runs the Docker container named \sphinxcode{\sphinxupquote{\$\{containerName\}}} with GPU support, mounts necessary volumes, and utilizes the specified Docker image \sphinxcode{\sphinxupquote{\$\{imageName\}}} for the Maxwell\sphinxhyphen{}TD application. Adjust \sphinxcode{\sphinxupquote{\$\{containerName\}}}, \sphinxcode{\sphinxupquote{\$\{hostVolumePath\}}}, \sphinxcode{\sphinxupquote{\$\{containerVolumePath\}}}, and \sphinxcode{\sphinxupquote{\$\{imageName\}}} as per your specific environment and requirements.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W21}.png}
\caption{Commands to run Docker image}\label{\detokenize{Manual:id20}}\end{figure}

\begin{sphinxadmonition}{note}{Note:}
\sphinxAtStartPar
When opening a Windows text file in a Unix environment, extra \sphinxcode{\sphinxupquote{\textbackslash{}r}} characters at the end of each line can cause errors such as \sphinxcode{\sphinxupquote{/bin/bash\textasciicircum{}M: bad interpreter: No such file or directory}}. This is because Unix\sphinxhyphen{}based systems expect lines to end with \sphinxcode{\sphinxupquote{\textbackslash{}n}} (newline) instead of \sphinxcode{\sphinxupquote{\textbackslash{}r\textbackslash{}n}} (carriage return followed by newline) used in Windows.

\sphinxAtStartPar
To fix this issue, you can convert the line endings from Windows format to Unix format using utilities like \sphinxcode{\sphinxupquote{dos2unix}}, which removes the extra \sphinxcode{\sphinxupquote{\textbackslash{}r}} characters. Alternatively, you can use the included function \sphinxcode{\sphinxupquote{Remove\sphinxhyphen{}CarriageReturns}} in \sphinxcode{\sphinxupquote{runDocker.ps1}} to process the files. Once corrected, your script should execute correctly within Docker or any Unix\sphinxhyphen{}based environment without encountering interpreter errors.
\end{sphinxadmonition}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W19}.png}
\caption{Miscellaneous function to treat textfiles from Windows System (Optional)}\label{\detokenize{Manual:id21}}\end{figure}

\sphinxAtStartPar
To run the script, navigate to the directory where \sphinxcode{\sphinxupquote{runDocker.ps1}} is located and execute \sphinxcode{\sphinxupquote{./runDocker.ps1}}. The script will display the CUDA toolkit version and open a BASH shell in the Docker container with \sphinxcode{\sphinxupquote{maxwell\_td\_image}}. This environment simulates a Linux environment.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W27}.png}
\caption{Running PowerShell Script}\label{\detokenize{Manual:id22}}\end{figure}


\paragraph{How to use Maxwell\sphinxhyphen{}TD}
\label{\detokenize{Manual:how-to-use-maxwell-td}}
\sphinxAtStartPar
Upon starting the Docker container, you will be in the \sphinxcode{\sphinxupquote{/dgtd/}} directory, where the Discontinuous Galerkin Time\sphinxhyphen{}Domain (DGTD) code is located. The compiled code can be found in the \sphinxcode{\sphinxupquote{/dgtd/build/}} directory, with the executables named \sphinxcode{\sphinxupquote{maxwelltd\_CUDA\_LTS\_DOUBLEpre\_FLOATpro}} and \sphinxcode{\sphinxupquote{maxwelltd\_CUDA\_LTS\_DOUBLEpre\_FLOATpro\sphinxhyphen{}}}. User data, mounted from the Windows filesystem, is available in the \sphinxcode{\sphinxupquote{/dgtd/model/}} directory. Before running the simulation, the compiled executable must be copied to the simulation folder (\sphinxcode{\sphinxupquote{/dgtd/model/MaxwellTD\_data/}}). This can be done by executing the following command:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
cp /dgtd/build/maxwelltd\PYGZus{}CUDA\PYGZus{}LTS\PYGZus{}DOUBLEpre\PYGZus{}FLOATpro* /dgtd/model/MaxwellTD\PYGZus{}data/
\end{sphinxVerbatim}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W29}.png}
\caption{Local Directory in Docker Image}\label{\detokenize{Manual:id23}}\end{figure}

\sphinxAtStartPar
Simulation files for the MaxwellTD model are located in the directory \sphinxcode{\sphinxupquote{/dgtd/model/MaxwellTD\_data}}. Additionally, we have included CST reference data for the same simulation model in the folder \sphinxcode{\sphinxupquote{CST\_data}}. A Python script named \sphinxcode{\sphinxupquote{compare\_maxwelltd\_CST.py}} has been provided to facilitate extraction and comparison of data between the DGTD simulation and CST data.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W31a}.png}
\caption{Simulation folder}\label{\detokenize{Manual:id24}}\end{figure}

\sphinxAtStartPar
To run the DGTD simulation, we can navigate to \sphinxcode{\sphinxupquote{/dgtd/model/MaxwellTD\_data/}} and run the shell script \sphinxcode{\sphinxupquote{CUDA\_LTS\_RUN.sh}}.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
./CUDA\PYGZus{}LTS\PYGZus{}RUN.sh
\end{sphinxVerbatim}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W45}.png}
\caption{Running Simulation script}\label{\detokenize{Manual:id25}}\end{figure}

\sphinxAtStartPar
This will initiate the DGTD simulation.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W46}.png}
\caption{Simulating running}\label{\detokenize{Manual:id26}}\end{figure}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W47}.png}
\caption{End of simulation}\label{\detokenize{Manual:id27}}\end{figure}

\sphinxAtStartPar
Following the completion of the simulation, you can execute the Python script \sphinxcode{\sphinxupquote{compare\_maxwelltd\_CST.py}} to compare the results with those obtained from the CST simulation.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
python3 compare\PYGZus{}maxwelltd\PYGZus{}CST.py
\end{sphinxVerbatim}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W49}.png}
\caption{Running post\sphinxhyphen{}processing PYTHON script}\label{\detokenize{Manual:id28}}\end{figure}


\paragraph{Common issues}
\label{\detokenize{Manual:common-issues}}

\subparagraph{Incompatible GPU drivers/toolkit}
\label{\detokenize{Manual:incompatible-gpu-drivers-toolkit}}
\sphinxAtStartPar
It’s essential to verify that your Windows device has the correct CUDA toolkit installed to run Maxwell\sphinxhyphen{}TD. You can check the CUDA toolkit version by using ‘nvidia\sphinxhyphen{}smi’ in the console terminal. The minimum required version to run Maxwell\sphinxhyphen{}TD is CUDA toolkit 12.4.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W22}.png}
\caption{Check CUDA toolkit version}\label{\detokenize{Manual:id29}}\end{figure}

\sphinxAtStartPar
If you need to update your CUDA toolkit, you can visit the \sphinxhref{https://developer.nvidia.com/cuda-toolkit}{NVIDIA website} (\sphinxurl{https://developer.nvidia.com/cuda-toolkit}). Click on ‘NVIDIA CUDA Toolkit Download’ to access the latest version. Alternatively, if you require an earlier version, you can navigate to ‘Archive of Previous CUDA Releases’ on the NVIDIA website to find the specific CUDA toolkit version you need.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W23}.png}
\caption{NVIDIA website to download CUDA toolkit}\label{\detokenize{Manual:id30}}\end{figure}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W24}.png}
\caption{NVIDIA CUDA toolkit download}\label{\detokenize{Manual:id31}}\end{figure}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W25}.png}
\caption{NVIDIA CUDA toolkit (Latest version)}\label{\detokenize{Manual:id32}}\end{figure}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W26}.png}
\caption{NVIDIA CUDA toolkit (Earlier versions)}\label{\detokenize{Manual:id33}}\end{figure}

\sphinxAtStartPar
Follow the download and installation instructions provided on the NVIDIA website to update or install the CUDA toolkit on your Windows device. This ensures that Maxwell\sphinxhyphen{}TD and other CUDA\sphinxhyphen{}dependent applications can function correctly.


\subparagraph{Windows Version}
\label{\detokenize{Manual:windows-version}}
\sphinxAtStartPar
Make sure your Windows 10 or 11 system meets the following requirements:
\begin{itemize}
\item {} 
\sphinxAtStartPar
\sphinxstylestrong{WSL Version:} Ensure WSL version 1.1.3.0 or newer.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Windows 11:} 64\sphinxhyphen{}bit Home or Pro version 21H2 or later, or Enterprise or Education version 21H2 or later.

\item {} 
\sphinxAtStartPar
\sphinxstylestrong{Windows 10:} 64\sphinxhyphen{}bit Home or Pro version 22H2 (build 19045) or later, or Enterprise or Education version 22H2 (build 19045) or later. The minimum supported version is Home or Pro 21H2 (build 19044) or later, or Enterprise or Education 21H2 (build 19044) or later.

\end{itemize}

\begin{sphinxadmonition}{note}{Note:}\begin{itemize}
\item {} 
\sphinxAtStartPar
Docker Desktop on Windows is supported only on versions of Windows that are still actively serviced by Microsoft. It is not compatible with Windows Server versions like Windows Server 2019 or Windows Server 2022.

\item {} 
\sphinxAtStartPar
Containers and images created with Docker Desktop are shared across all user accounts on the same machine, as they use a common VM for building and running containers. However, sharing containers and images between user accounts is not supported when using the Docker Desktop WSL 2 backend.

\end{itemize}
\end{sphinxadmonition}


\subparagraph{Sufficient Memory to upload image}
\label{\detokenize{Manual:sufficient-memory-to-upload-image}}
\sphinxAtStartPar
Make sure your system has adequate storage space for the image. The current image requires 10GB for storage while zipped. Once extracted, it occupies an additional 10GB on your system, although it remains hidden from regular users. You can view these hidden images and containers using Docker Desktop.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W42}.png}
\caption{View all containers or image on Docker Desktop}\label{\detokenize{Manual:id34}}\end{figure}

\sphinxAtStartPar
Users can remove any unwanted images or containers using the ‘delete’ button.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=1200\sphinxpxdimen]{{W43}.png}
\caption{Delete if not needed to free up space}\label{\detokenize{Manual:id35}}\end{figure}

\sphinxAtStartPar
If necessary, resort to command\sphinxhyphen{}line operations to reclaim system resources. Execute these commands in a PowerShell console with administrative privileges.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{c+c1}{\PYGZsh{} Purging All Unused or Dangling Resources}
docker system prune

\PYG{c+c1}{\PYGZsh{} Remove stopped containers and all unused images}
docker system prune \PYGZhy{}a

\PYG{c+c1}{\PYGZsh{} Removing Docker Images}

\PYG{c+c1}{\PYGZsh{}\PYGZsh{} Remove Specific Images}
\PYG{c+c1}{\PYGZsh{} List all images (including intermediate layers)}
docker images \PYGZhy{}a

\PYG{c+c1}{\PYGZsh{} Remove specific image(s) using their ID or tag}
docker rmi \PYGZlt{}image\PYGZus{}id\PYGZus{}or\PYGZus{}name\PYGZgt{}

\PYG{c+c1}{\PYGZsh{}\PYGZsh{} Remove Dangling Images}
\PYG{c+c1}{\PYGZsh{} List dangling images}
docker images \PYGZhy{}f \PYG{n+nv}{dangling}\PYG{o}{=}\PYG{n+nb}{true}

\PYG{c+c1}{\PYGZsh{} Remove dangling images}
docker image prune

\PYG{c+c1}{\PYGZsh{}\PYGZsh{} Remove Images Matching a Pattern}
\PYG{c+c1}{\PYGZsh{} List images matching a pattern (using grep)}
docker images \PYGZhy{}a \PYG{p}{|} grep \PYG{l+s+s2}{\PYGZdq{}pattern\PYGZdq{}}

\PYG{c+c1}{\PYGZsh{} Remove images matching a pattern using awk and xargs}
docker images \PYGZhy{}a \PYG{p}{|} grep \PYG{l+s+s2}{\PYGZdq{}pattern\PYGZdq{}} \PYG{p}{|} awk \PYG{l+s+s1}{\PYGZsq{}\PYGZob{}print \PYGZdl{}1\PYGZdq{}:\PYGZdq{}\PYGZdl{}2\PYGZcb{}\PYGZsq{}} \PYG{p}{|} xargs docker rmi

\PYG{c+c1}{\PYGZsh{}\PYGZsh{} Remove All Images}
\PYG{c+c1}{\PYGZsh{} Remove all Docker images}
docker rmi \PYG{k}{\PYGZdl{}(}docker images \PYGZhy{}a \PYGZhy{}q\PYG{k}{)}

\PYG{c+c1}{\PYGZsh{} Removing Containers}

\PYG{c+c1}{\PYGZsh{}\PYGZsh{} Remove Specific Containers}
\PYG{c+c1}{\PYGZsh{} List all containers (including stopped ones)}
docker ps \PYGZhy{}a

\PYG{c+c1}{\PYGZsh{} Remove specific container(s)}
docker rm \PYGZlt{}container\PYGZus{}id\PYGZus{}or\PYGZus{}name\PYGZgt{}

\PYG{c+c1}{\PYGZsh{}\PYGZsh{} Remove All Exited Containers}
\PYG{c+c1}{\PYGZsh{} List all exited containers}
docker ps \PYGZhy{}a \PYGZhy{}f \PYG{n+nv}{status}\PYG{o}{=}exited

\PYG{c+c1}{\PYGZsh{} Remove all exited containers}
docker rm \PYG{k}{\PYGZdl{}(}docker ps \PYGZhy{}a \PYGZhy{}f \PYG{n+nv}{status}\PYG{o}{=}exited \PYGZhy{}q\PYG{k}{)}

\PYG{c+c1}{\PYGZsh{}\PYGZsh{} Remove Containers Matching a Pattern}
\PYG{c+c1}{\PYGZsh{} List containers matching a pattern (using grep)}
docker ps \PYGZhy{}a \PYG{p}{|} grep \PYG{l+s+s2}{\PYGZdq{}pattern\PYGZdq{}}

\PYG{c+c1}{\PYGZsh{} Remove containers matching a pattern using awk and xargs}
docker ps \PYGZhy{}a \PYG{p}{|} grep \PYG{l+s+s2}{\PYGZdq{}pattern\PYGZdq{}} \PYG{p}{|} awk \PYG{l+s+s1}{\PYGZsq{}\PYGZob{}print \PYGZdl{}1\PYGZcb{}\PYGZsq{}} \PYG{p}{|} xargs docker rm

\PYG{c+c1}{\PYGZsh{}\PYGZsh{} Stop and Remove All Containers}
\PYG{c+c1}{\PYGZsh{} Stop all containers}
docker stop \PYG{k}{\PYGZdl{}(}docker ps \PYGZhy{}a \PYGZhy{}q\PYG{k}{)}

\PYG{c+c1}{\PYGZsh{} Remove all containers}
docker rm \PYG{k}{\PYGZdl{}(}docker ps \PYGZhy{}a \PYGZhy{}q\PYG{k}{)}
\end{sphinxVerbatim}


\subparagraph{BIOS settings}
\label{\detokenize{Manual:bios-settings}}
\sphinxAtStartPar
To enable Docker server virtualization on Windows, it’s crucial to ensure that virtualization is enabled in your computer’s BIOS settings. This setting can only be modified by restarting your machine and accessing the BIOS configuration. Virtualization support in BIOS allows Windows to utilize Docker server features effectively. It’s a necessary step to ensure Docker containers run efficiently on your system.


\subparagraph{Change Simulation Parameters}
\label{\detokenize{Manual:change-simulation-parameters}}
\sphinxAtStartPar
To modify simulation parameters, you can edit the \sphinxcode{\sphinxupquote{CUDA\_LTS\_RUN.sh}} shell script. This script contains flags or variables that control various aspects of the DGTD simulation. The script includes comments or descriptions to explain the variables’ or flags’ purpose.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nb}{echo} \PYG{l+s+s2}{\PYGZdq{}===========\PYGZdq{}}
\PYG{n+nb}{echo} \PYG{l+s+s2}{\PYGZdq{}EXECUTABLE\PYGZdq{}}
\PYG{n+nv}{EXE}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}./maxwelltd\PYGZus{}CUDA\PYGZus{}LTS\PYGZus{}DOUBLEpre\PYGZus{}FLOATpro\PYGZdq{}}
\PYG{n+nb}{echo} \PYG{n+nv}{\PYGZdl{}EXE}
\PYG{n+nb}{echo} \PYG{l+s+s2}{\PYGZdq{}FileName\PYGZdq{}}
\PYG{n+nb}{echo} \PYG{l+s+s2}{\PYGZdq{}===========\PYGZdq{}}

\PYG{c+c1}{\PYGZsh{} 0. [EXE]}
\PYG{c+c1}{\PYGZsh{} 1. Filename: Simulation Filename}
\PYG{c+c1}{\PYGZsh{} 2. Freq: Central Modulation Frequency (MHz)}
\PYG{c+c1}{\PYGZsh{} 3. Planewave Waveform (Excitation Type): (0)Time Harmonic (1)Gauss (2)Neumann (3) Modulated Gauss;}
\PYG{c+c1}{\PYGZsh{} 4. Port Waveform (0) Time Harmonic Pulse (1) Gaussian Pulse}
\PYG{c+c1}{\PYGZsh{} 5. Tdelay: Delay of excitation pulse (sec)}
\PYG{c+c1}{\PYGZsh{} 6. Tau: Width of pulse (sec)}
\PYG{c+c1}{\PYGZsh{} 7. FinalTime: Termination Time (sec)}
\PYG{c+c1}{\PYGZsh{} 8. Gamma (Penalty) \PYGZhy{}\PYGZhy{}\PYGZgt{} 1 upwind , 0 central}
\PYG{c+c1}{\PYGZsh{} 9. VTU \PYGZhy{}\PYGZhy{}\PYGZgt{} 0 (YES), 1 (NO)}
\PYG{c+c1}{\PYGZsh{}10. Surface Field Output BC Surfaces  \PYGZhy{}\PYGZhy{}\PYGZgt{} (0) Off (1) PEC only (2) FieldPlane only (3) FieldPlane and PEC}
\PYG{c+c1}{\PYGZsh{}11. Surface Output Types \PYGZhy{}\PYGZhy{}\PYGZgt{} (0) Field (1) Current (2) Field and Current}
\PYG{c+c1}{\PYGZsh{}12. Poly order \PYGZhy{}\PYGZhy{}\PYGZgt{} (1) First Order (2) Second Order}
\PYG{c+c1}{\PYGZsh{}13. Free Space Comparison(Analytical): (0) True and (1) False}
\PYG{c+c1}{\PYGZsh{}14. SAMPLINGRATE : parameter of Pade approximation}
\PYG{c+c1}{\PYGZsh{}15. PADE : (0) Pade mode is Off (2) Pade mode is on}

\PYG{n+nv}{FILENAME}\PYG{o}{=}cylinder\PYGZus{}cr1.75
\PYG{n+nv}{FREQ}\PYG{o}{=}\PYG{l+m}{2650}
\PYG{n+nv}{PLANEWAVEFLAG}\PYG{o}{=}\PYG{l+m}{1}
\PYG{n+nv}{PORTFLAG}\PYG{o}{=}\PYG{l+m}{1}
\PYG{n+nv}{TD}\PYG{o}{=}\PYG{l+m}{2}.5e\PYGZhy{}9
\PYG{n+nv}{TAU}\PYG{o}{=}\PYG{l+m}{2}.5e\PYGZhy{}10
\PYG{n+nv}{FINALTIME}\PYG{o}{=}25e\PYGZhy{}8
\PYG{n+nv}{GAMMA}\PYG{o}{=}\PYG{l+m}{0}.025
\PYG{n+nv}{VTU}\PYG{o}{=}\PYG{l+m}{1}
\PYG{n+nv}{SURFFIELDOUTBCSURFS}\PYG{o}{=}\PYG{l+m}{0}
\PYG{n+nv}{SURFOUTTYPES}\PYG{o}{=}\PYG{l+m}{0}
\PYG{n+nv}{POLYORDER}\PYG{o}{=}\PYG{l+m}{2}
\PYG{n+nv}{ANALYTICAL}\PYG{o}{=}\PYG{l+m}{1}
\PYG{n+nv}{SAMPLINGRATE}\PYG{o}{=}\PYG{l+m}{12}.5
\PYG{n+nv}{PADE}\PYG{o}{=}\PYG{l+m}{2}

rm *.log
rm *.vtu
rm AnalyticalIncidentField*
rm Probes\PYGZus{}*
rm *.TD*
rm \PYGZhy{}r ./TimeDomainVoltages
\PYG{n+nv}{\PYGZdl{}EXE} \PYG{n+nv}{\PYGZdl{}FILENAME} \PYG{n+nv}{\PYGZdl{}FREQ} \PYG{n+nv}{\PYGZdl{}PLANEWAVEFLAG} \PYG{n+nv}{\PYGZdl{}PORTFLAG} \PYG{n+nv}{\PYGZdl{}TD} \PYG{n+nv}{\PYGZdl{}TAU} \PYG{n+nv}{\PYGZdl{}FINALTIME} \PYG{n+nv}{\PYGZdl{}GAMMA} \PYG{n+nv}{\PYGZdl{}VTU} \PYG{n+nv}{\PYGZdl{}SURFFIELDOUTBCSURFS} \PYG{n+nv}{\PYGZdl{}SURFOUTTYPES} \PYG{n+nv}{\PYGZdl{}POLYORDER} \PYG{n+nv}{\PYGZdl{}ANALYTICAL} \PYG{n+nv}{\PYGZdl{}SAMPLINGRATE} \PYG{n+nv}{\PYGZdl{}PADE} \PYG{p}{|} tee \PYGZhy{}a compute.log
rm \PYGZhy{}r ./VTU\PYGZus{}LTS
mkdir ./VTU\PYGZus{}LTS
mv *.vtu ./VTU\PYGZus{}LTS
rm \PYGZhy{}r ./PROBES
mkdir ./PROBES
mv *.csv ./PROBES
mv *.TD* ./PROBES
mv *.log ./PROBES
\end{sphinxVerbatim}



\renewcommand{\indexname}{Index}
\printindex
\end{document}