This guide will walk you through setting up and running the MLConnector using Docker.
Before you begin, ensure you have the following installed on your system:
- Docker: Install Docker Engine and Docker Compose from Docker’s official website.
The MLConnector relies on several external components. Define the following environment variables in your shell or an .env file:
The MLConnector dynamically creates and stores docker images for inference applications used within MYLSysOps. As such, it needs to to be able to communicate to a registry weather public, or private. This application was tested with docker registry. For further information on docker registry check.
DOCKER_REGISTRY_ENDPOINT: Your Docker registry endpointDOCKER_USERNAME: Your Docker registry usernameDOCKER_PASSWORD: Your Docker registry password
The MLConnector uses an external storage service, S3 to store it's data including training data and other files. You will need to setup and S3 bucket, or S3 compatible service to complete this setup. After, please provide the following details. If you do not have access to S3 bucket, or S3 compatible service, please contact us and we can help setup a temporarly one.
AWS_ACCESS_URL: AWS S3 endpoint URLAWS_ACCESS_KEY_ID: AWS access key IDAWS_SECRET_ACCESS_KEY: AWS secret access keyAWS_S3_BUCKET_DATA: Name of the S3 bucket for data
This is used for internal communication of the varrious services. You can setup an external database service if you like. For simplicity you can you use the default values;
POSTGRES_DB: PostgreSQL database name (default,mlmodel)POSTGRES_USER: PostgreSQL username (default,postgres)POSTGRES_PASSWORD: PostgreSQL password (default,strongpassword)PGADMIN_DEFAULT_EMAIL: pgAdmin default login email (default,user@mail.com)PGADMIN_DEFAULT_PASSWORD: pgAdmin default login password (default,strongpassword)DB_HOST_NAME: Database host (e.g.,database, This corresponds to the name of the container)DB_PORT: Database port (default:5432)DB_DRIVER: Database driver string (default,postgresql+asyncpg) NOTE: Only use an async driver
The MLConnector communicates with part of the MYLSyops via the NORTHBOUND_API. Please set this value to the right endpoint.
NORTHBOUND_API_ENDPOINT: Base URL for the Northbound API (e.g.,http://your-host:8000)
-
Start the Docker Containers
docker compose up -d
This command builds and launches all required services in detached mode.
-
View Container Logs
docker compose logs -f
Once the services are up and running, open your browser and navigate to:
http://<your-host>:8090/redoc
Replace <your-host> with your server’s hostname or localhost if running locally.
- Port Conflicts: Ensure ports
8090(API docs) and your database port are available. - Environment Variables: Verify all required variables are set. Use
docker compose configto inspect the interpolated configuration. - Docker Connectivity: Ensure Docker Engine is running and your user has permissions to run Docker commands.
- API Error Codes: All status codes and error messages can be accessed via:
http://<your-host>:8090/redoc