From 1b5afeeed0f9b8bf0c844a11c72e17143b721510 Mon Sep 17 00:00:00 2001
From: PGijsbers
Date: Wed, 16 Sep 2026 11:20:57 +0300
Subject: [PATCH 1/3] Split up Python API in light and full service
---
docker-compose.yaml | 39 +++++++++++++++++++++++++++------------
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/docker-compose.yaml b/docker-compose.yaml
index f2af39d..6c79612 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -62,8 +62,10 @@ services:
php-api:
profiles: ["all", "minio", "rest-api", "frontend", "evaluation-engine"]
- image: openml/php-rest-api:v1.2.4
+ image: openml/php-api:dev
container_name: "openml-php-rest-api"
+ cap_add:
+ - SYS_PTRACE
ports:
- "8080:80" # also known as /api (nginx)
env_file: config/php/.env
@@ -85,22 +87,21 @@ services:
extra_hosts:
- "localhost=172.28.0.2"
- # This is the new REST API, which will later replace the PHP REST API
- python-api:
- profiles: ["all", "rest-api"]
+ # The Python based REST API is set to replace the PHP based REST API
+ # The 'light' profile can be used to test most of the REST API
+ # (everything except file uploads/downloads), but is
+ # faster to start and requires fewer resources to run.
+ python-api-light:
+ # if no profile is set below, it starts on all `compose up` invocations,
+ # which leads to port conflict if `python-api` is also started.
+ profiles: ["rest-api-light"]
image: openml/rest-api:0.0.1-alpha
- container_name: "openml-python-rest-api"
+ container_name: "openml-python-rest-api-light"
ports:
- "8082:8000" # or localhost:8000/py with nginx
depends_on:
database-setup:
condition: service_completed_successfully
- php-api:
- condition: service_healthy # used for serving arff files
- minio:
- condition: service_started # used for serving parquet files
- nginx:
- condition: service_started # used for routing to MinIO and PHP REST API
volumes:
- ./config/python-server/config.toml:/python-api/src/config.toml
healthcheck:
@@ -110,6 +111,20 @@ services:
timeout: 3s
interval: 1m
+ python-api:
+ profiles: ["all", "rest-api"]
+ container_name: "openml-python-rest-api"
+ extends: python-api-light
+ depends_on:
+ database-setup:
+ condition: service_completed_successfully
+ php-api:
+ condition: service_healthy # used for serving arff files
+ minio:
+ condition: service_started # used for serving parquet files
+ nginx:
+ condition: service_started # used for routing to MinIO and PHP REST API
+
email-server:
profiles: ["all", "frontend"]
image: foxcpp/maddy:latest
@@ -138,7 +153,7 @@ services:
condition: service_healthy
minio:
- profiles: ["all", "minio", "evaluation-engine"]
+ profiles: ["all", "minio", "rest-api", "evaluation-engine"]
image: openml/test-minio:v0.1.20260204
container_name: "openml-minio"
ports:
From f029cbb13750103cd875e4f452b7f9bcec05eb3d Mon Sep 17 00:00:00 2001
From: PGijsbers
Date: Wed, 16 Sep 2026 11:28:38 +0300
Subject: [PATCH 2/3] Revert accidental changes to the php-api service
---
docker-compose.yaml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 6c79612..2ca78ce 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -62,10 +62,8 @@ services:
php-api:
profiles: ["all", "minio", "rest-api", "frontend", "evaluation-engine"]
- image: openml/php-api:dev
+ image: openml/php-rest-api:v1.2.4
container_name: "openml-php-rest-api"
- cap_add:
- - SYS_PTRACE
ports:
- "8080:80" # also known as /api (nginx)
env_file: config/php/.env
From 14e116a8391ec587b299394b36eddf9aa1d02574 Mon Sep 17 00:00:00 2001
From: PGijsbers
Date: Wed, 16 Sep 2026 11:55:36 +0300
Subject: [PATCH 3/3] Add documentation on the `light` service
---
README.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/README.md b/README.md
index a607142..2f165b4 100644
--- a/README.md
+++ b/README.md
@@ -59,6 +59,15 @@ docker compose --profile frontend up -d # Frontend, rest-api, elasticsearch and
```
Use the same profile for your `down` command.
+The Python REST API is also available in a 'light' mode that allows for database interactions
+but does not allow for file uploads/downloads. It has to be started directly (as opposed to
+through a profile):
+```bash
+docker compose up python-rest-api-light -d
+docker compose down
+```
+While it is up, the API is available under `http://localhost:8082`, e.g., `http://localhost:8082/datasets/1`.
+
## Known issues
See the Github Issue list for the known issues.