Hi, you may want to try the dockerfile on this link.
I copy it here for reference:
Using @bwengals docker image the model graph to png saving is work. Its not minimal but at least shows it can work!
FROM jupyter/minimal-notebook:python-3.9.5
USER root
RUN apt update && apt upgrade -y \
&& apt -y install --no-install-recommends -qq \
curl ca-certificates make g++ git vim-tiny openssh-client \
unzip tzdata htop \
&& apt clean && rm -rf /var/lib/apt/lists/*
USER ${NB_UID}
RUN mamba install -c conda-forge -y \
compilers \
filelock \
cython \
numpy \
scipy \
sympy \
pypolyagamma \
mkl \
mkl-service \
"libblas=*=*mkl" \
numba \
numba-scipy \
"arviz>=0.11.2" \
"cachetools>=4.2.1" \
cloudpickle \
"fastprogress>=0.2.0" \
"h5py>=2.7" \
"ipython>=7.16" \
"libblas=*=*mkl" \
mkl-service \
myst-nb \
"nbsphinx>=0.4" \
"numpy>=1.15.0" \
"numpydoc>=0.9" \
"pandas>=0.24.0" \
"pre-commit>=2.8.0" \
pydata-sphinx-theme \
"pytest-cov>=2.5" \
"pytest>=3.0" \
python-graphviz \
"recommonmark>=0.4" \
"scipy>1.4.1" \
"sphinx-autobuild>=0.7" \
sphinx-panels \
"sphinx>=1.5" \
"typing-extensions>=3.7.4" \
watermark \
voila \
&& conda clean --all -f -y \
&& fix-permissions "${CONDA_DIR}" \
&& fix-permissions "/home/${NB_USER}"
RUN mamba install -c conda-forge -y \
scikit-learn linearmodels \
matplotlib plotly bokeh ipywidgets pre-commit \
xarray psycopg2 \
fastapi toml \
&& conda clean --all -f -y \
&& fix-permissions "${CONDA_DIR}" \
&& fix-permissions "/home/${NB_USER}"
RUN mamba install -c conda-forge pymc3 -y \
&& conda clean --all -f -y \
&& fix-permissions "${CONDA_DIR}" \
&& fix-permissions "/home/${NB_USER}"
## other environment variables
ENV JUPYTER_ENABLE_LAB=1
WORKDIR /home/$NB_USER
USER ${NB_UID}
COPY ./model_test.py .
RUN python model_test.py
RUN ls