janis_puris
02/06/2023, 5:40 PMprefect_docker
and while any other image runs without issues, the Meltano official one would throw code 137 😞
Here is a simple recipe..
$ python3 -m venv venv && source venv/bin/activate
$ python -m pip install prefect_docker
$ python
from prefect import flow, get_run_logger
from prefect_docker.images import pull_docker_image
from prefect_docker.containers import create_docker_container, start_docker_container, get_docker_container_logs, stop_docker_container
@flow
def create_docker_container_flow():
logger = get_run_logger()
pull_docker_image("meltano/meltano", "latest")
container = create_docker_container(
image="meltano/meltano:latest",
command="--version"
)
start_docker_container(container_id=container.id)
logs = get_docker_container_logs(container_id=container.id)
<http://logger.info|logger.info>(logs)
stop_docker_container(container_id=container.id)
#remove_docker_container(container_id=container.id)
create_docker_container_flow()
killed immediately, returns code 137
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3d9b3e42797a meltano/meltano:latest "meltano --version" 58 seconds ago Exited (137) 43 seconds ago focused_beaver
You'd expect to see meltano version writted to stdout as such
$ docker run meltano/meltano:latest '--version'
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
meltano, version 2.15.1
No logs 😞
$ docker logs focused_beaver
It very well be something with me being on Apple silicon.. would be awesome, if someone could try to reproduce this on Intel 🙏
edit: It may very well be something with the Prefect's prefect_docker package, but since all the images I've tested with it works without an issue, I'm leaning on Meltano not playing ball herejanis_puris
02/06/2023, 7:49 PM# uname -a
Linux dataplatform-jp-sandbox 5.15.0-1028-aws #32-Ubuntu SMP Mon Jan 9 12:28:07 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
janis_puris
02/06/2023, 8:41 PMjanis_puris
02/07/2023, 2:28 PM