From 873598b8c6acaa534e9febcda244a7836d45005b Mon Sep 17 00:00:00 2001 From: Jonathan Felder Date: Tue, 16 Jul 2024 14:16:45 -0700 Subject: [PATCH] [DH-329] make webpdf export work for data102 --- deployments/data102/image/apt.txt | 4 ++++ deployments/data102/image/environment.yml | 2 +- deployments/data102/image/postBuild | 5 +++++ deployments/data102/image/start | 5 +++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 deployments/data102/image/postBuild create mode 100644 deployments/data102/image/start diff --git a/deployments/data102/image/apt.txt b/deployments/data102/image/apt.txt index 2aa86a867..2cc25eaf7 100644 --- a/deployments/data102/image/apt.txt +++ b/deployments/data102/image/apt.txt @@ -75,3 +75,7 @@ meld # For jupyter-tree-download. Ref: https://github.com/berkeley-dsep-infra/datahub/issues/3979 zip + +# playwright deps https://jira-secure.berkeley.edu/browse/DH-305 +libnss3 +libnspr4 diff --git a/deployments/data102/image/environment.yml b/deployments/data102/image/environment.yml index c312f3f52..2e74cf4b6 100644 --- a/deployments/data102/image/environment.yml +++ b/deployments/data102/image/environment.yml @@ -47,7 +47,7 @@ dependencies: # disable until fixed (probably this: https://github.com/jupyterlab/jupyter-collaboration/issues/162) # - jupyter_collaboration==1.0.1 - jupyterhub==4.1.5 - - nbconvert==7.6.0 + - nbconvert[webpdf]==7.16.4 - gh-scoped-creds==4.1 - nb2pdf==0.6.2 - nbpdfexport==0.2.1 diff --git a/deployments/data102/image/postBuild b/deployments/data102/image/postBuild new file mode 100644 index 000000000..1b6bcc9d1 --- /dev/null +++ b/deployments/data102/image/postBuild @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +# installing chromium browser to enable webpdf conversion using nbconvert +export PLAYWRIGHT_BROWSERS_PATH=${CONDA_DIR} +playwright install chromium diff --git a/deployments/data102/image/start b/deployments/data102/image/start new file mode 100644 index 000000000..c3a978b7f --- /dev/null +++ b/deployments/data102/image/start @@ -0,0 +1,5 @@ +#!/bin/bash + +# See https://jira-secure.berkeley.edu/browse/DH-305 +export PLAYWRIGHT_BROWSERS_PATH=${CONDA_DIR} +exec "$@"