Automatically remove Containers with DockerRunLauncher #9739
-
Hi, I have the following problem. I have a Dagster Setup running with the DockerRunLauncher. Everything is working fine. The Problem is, that for each Job, a container is created, which is not deleted afterwards. As each container is multiple Gigabytes big (because of some Data Wrangling) the Hard-Drive is filled very fast, which leads to crashing the Database because there is not enough Hard-Drive space left. The Question: Is there a way to setup the DockerRunLauncher in a way, that after the container ran and did its job, its automatically removed? Thanks for your help in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Yes: # dagster.yaml
run_launcher:
class: DockerRunLauncher
module: dagster_docker
config:
container_kwargs:
auto_remove: true This will get passed to the the |
Beta Was this translation helpful? Give feedback.
-
This was working till last week with the dagster docker agent, suddenly stopped working.
Any change that affected this? @johannkm |
Beta Was this translation helpful? Give feedback.
Yes:
This will get passed to the the
auto_remove
param of the Docker api run method, documented here: https://docker-py.readthedocs.io/en/stable/containers.html#docker.models.containers.ContainerCollection.run