Docker
Note
If you are running on a non-bare metal server, or prefer not to use VMware and VirtualBox platforms, Docker is the recommended option. For optimal performance, KVM support is recommended.
Prerequisite Check
Before installing Docker, check if your machine supports KVM (recommended for better performance):
On Linux, run:
egrep -c '(vmx|svm)' /proc/cpuinfo
If the return value is greater than zero, your processor supports KVM.
Note
macOS hosts generally do not support KVM. For macOS users, we recommend using VMware instead.
Docker Installation
Choose the appropriate installation method based on your system:
For systems with GUI:
For Linux: Follow the Docker Desktop for Linux installation guide
For Windows: Follow the Docker Desktop for Windows installation guide
For systems without GUI:
Follow the Docker Engine installation guide
Verification
Verify the installation by running:
docker --version
Usage Example
To use Docker as your provider, initialize the DesktopEnv with the following parameters:
# Initialize environment with Docker provider
env = DesktopEnv(
provider_name="docker",
os_type="Ubuntu" # or "Windows" if you want to create a Windows VM
)
Clean-up Note
Important
If experiments are interrupted abnormally, there may be residual docker containers. To clean up, run:
docker stop $(docker ps -q) && docker rm $(docker ps -a -q)