From b10f0e11babb4152631b6184cb4f6a1bc583f6cb Mon Sep 17 00:00:00 2001 From: apcho Date: Wed, 11 Jun 2025 14:54:25 -0700 Subject: [PATCH] Remove notebook export options that are not supported by SMD **Description** PDF, webPDF, qtpng, and qtpdf exports fail in MaxDome and SageMaker Studio JL, requiring extra configuration and package installations to function. Many of these dependencies are very large, so they are not being considered to be included in the SageMaker Distribution at this time. This PR disables these exporters. **Testing Done** Update jupyter_server_config.py in local workspace and restart server; confirmed failing options no longer appear. --- .../sagemaker-ui/jupyter/server/jupyter_server_config.py | 6 ++++++ template/v3/dirs/etc/jupyter/jupyter_server_config.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/template/v2/dirs/etc/sagemaker-ui/jupyter/server/jupyter_server_config.py b/template/v2/dirs/etc/sagemaker-ui/jupyter/server/jupyter_server_config.py index 7ce6e079e..5eab545f2 100644 --- a/template/v2/dirs/etc/sagemaker-ui/jupyter/server/jupyter_server_config.py +++ b/template/v2/dirs/etc/sagemaker-ui/jupyter/server/jupyter_server_config.py @@ -17,6 +17,12 @@ # Related documentation: https://jupyterlab.readthedocs.io/en/stable/user/files.html#displaying-hidden-files c.ContentsManager.allow_hidden = True +# Disable exporters that are not supported by the sagemaker distribution +c.PDFExporter.enabled = False +c.WebPDFExporter.enabled = False +c.QtPNGExporter.enabled = False +c.QtPDFExporter.enabled = False + # This will set the LanguageServerManager.extra_node_roots setting if amazon_sagemaker_sql_editor exists in the # environment. Ignore otherwise, don't fail the JL server start # Related documentation: https://jupyterlab-lsp.readthedocs.io/en/v3.4.0/Configuring.html diff --git a/template/v3/dirs/etc/jupyter/jupyter_server_config.py b/template/v3/dirs/etc/jupyter/jupyter_server_config.py index 0182cc238..53ec20b77 100644 --- a/template/v3/dirs/etc/jupyter/jupyter_server_config.py +++ b/template/v3/dirs/etc/jupyter/jupyter_server_config.py @@ -15,6 +15,12 @@ # Related documentation: https://jupyterlab.readthedocs.io/en/stable/user/files.html#displaying-hidden-files c.ContentsManager.allow_hidden = True +# Disable exporters that are not supported by the sagemaker distribution +c.PDFExporter.enabled = False +c.WebPDFExporter.enabled = False +c.QtPNGExporter.enabled = False +c.QtPDFExporter.enabled = False + # This will set the LanguageServerManager.extra_node_roots setting if amazon_sagemaker_sql_editor exists in the # environment. Ignore otherwise, don't fail the JL server start # Related documentation: https://jupyterlab-lsp.readthedocs.io/en/v3.4.0/Configuring.html