From ccdfe95d3234907ef70cde4731b0e449de7e80e1 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 20 Nov 2024 09:24:47 -0700 Subject: [PATCH] prevent GPU failure running in containers by running kaleido with single process option --- metplotpy/plots/base_plot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/metplotpy/plots/base_plot.py b/metplotpy/plots/base_plot.py index de0458a2..4897c0f0 100644 --- a/metplotpy/plots/base_plot.py +++ b/metplotpy/plots/base_plot.py @@ -21,11 +21,14 @@ import yaml from typing import Union +import plotly.io as pio + import metplotpy.plots.util from .config import Config from metplotpy.plots.context_filter import ContextFilter - +# set kaleido to use single process to prevent GPU errors in containers +pio.kaleido.scope.chromium_args += ("--single-process",) class BasePlot: """A class that provides methods for building Plotly plot's common features