Skip to content

1.2 Docker guide

Quentin Ulmer edited this page Apr 25, 2024 · 6 revisions

Introduction

This is a step-by-step guide on how to set up and run the whole MetaAutoML project on Windows using Docker. For Linux, things should be essentially the same but you only have to install docker and docker-compose. Note that running all Containers simultaneously in docker-compose takes a lot of RAM (up to 32GB!). You can still do this if you have less RAM because your OS will swap some memory to disk, but that costs performance. If you run this inside a Virtual Machine with limited RAM and disc space you may run into issues. Another option for developers is to comment out non-needed containers in the docker-compose.yml file to reduce RAM and CPU usage.

Quick Start Guide

1. Install docker desktop

This project depends on docker desktop, get the latest version on their website. Additionally install Github Desktop to clone the repository. Download link: https://desktop.github.com/

2. Clone the project

Open GitHub Desktop and select Clone a repository from the Internet. Within the new dialog select the URL tab, and insert the repository URL: https://github.com/hochschule-darmstadt/MetaAutoML.git. It is recommended to select a short local path to avoid any issues with long paths within Python (clone the repository on your desktop for example).

Alternatively, you can use the git CLI tool:

git clone [email protected]:hochschule-darmstadt/MetaAutoML.git

Hint: On Windows there are occasionally problems using [email protected] as it is a ssh connection and, if not set up properly, will produce errors. If these errors occur you can exchange [email protected]: in the URL with https://github.com/ for example:

git clone https://github.com/hochschule-darmstadt/MetaAutoML.git.

3. Run the project

After the project is successfully cloned it can be run via the docker-compose files. Open a new command line inside the root folder of the repository (MetaAutoML) and enter:

docker-compose -f docker-compose.yml -f docker-compose-frontend.yml up

Note: make sure that docker is running first!

Note: If any of changes on the main branch are made, its necessary to rebuild the certain adapter that have been changed :

docker-compose build "Adapter-name"

Its also possible to run the adapter individually afterwards to make sure that the new changes are working properly:

docker-compose up -d --no-deps --force-recreate "Adapter-name"

The frontend is reachable on Windows through the browser on:

http://host.docker.internal:54415/

username: user, password: +User123

For MacOS the URL changes to the mac IP address: IP:54415 "Localhost" does not work(White Screen). Use the actual IP address. An easy way to find it is in Settings under WIFI Settings - IP.

For Some Windows Devices The frontend is might not be reachable throught localhost so using the command "ipconfig" will show the IP address of the docker server so it can be accessed to:

http://"Docker IP address":54415/

Error handling

While trying to build docker-compose some docker errors might occur, following errors have been observed with their respective workarounds:

ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE

image

The above error has been observed with several adapters. It implies a downloaded package is not intact as their SHA do not match.

Workaround: just restart the docker compose build process.

failed to solve: executor failed running ....

image

The above error has been observed with the AutoPytorch adapter. It implies that the fetching of additional packages did not work.

Workaround: just restart the docker compose build process.

Error response from daemon: Ports are not available: exposing port TCP

image

The above error has been observed with the frontend. It implies while starting the docker container the predetermined port within docker compose could not be bound in the local system (port already in use, most likely).

Workaround: Change both assigned ports required by the frontend to different ports in the docker-compose-frontent.yml file

Example: image

When changing the frontend ports, the URL on which it can be accessed change to your new port number: http://host.docker.internal:NEW_PORT_NUMBER/