Skip to content

Commit

Permalink
[DH-325] make webpdf export work
Browse files Browse the repository at this point in the history
  • Loading branch information
felder committed Jul 16, 2024
1 parent 274d8e4 commit 2382e3a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions deployments/data8/image/apt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,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-325
libnss3
libnspr4
3 changes: 2 additions & 1 deletion deployments/data8/image/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ dependencies:
#- -r infra-requirements.txt
- jupyter-tree-download==1.0.1
# Export notebooks as PDFs with Chrome
- nbconvert==7.6.0
- nb2pdf==0.6.2
- nbpdfexport==0.2.1
# Enable webpdf export DH-325
- nbconvert[webpdf]==7.16.4
# Conda only has 0.12.0
- okpy==1.18.1
- git+https://github.com/shaneknapp/python-popularity-contest.git@add-error-handling
Expand Down
5 changes: 5 additions & 0 deletions deployments/data8/image/postBuild
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions deployments/data8/image/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# See https://jira-secure.berkeley.edu/browse/DH-305
export PLAYWRIGHT_BROWSERS_PATH=${CONDA_DIR}
exec "$@"

0 comments on commit 2382e3a

Please sign in to comment.