Skip to content

Commit e768fd3

Browse files
xuzhao9facebook-github-bot
authored andcommitted
Fix doctr model build failure (#1883)
Summary: We need to upgrade the glib version from conda to make the weasyprint package compatible. Pull Request resolved: #1883 Reviewed By: janeyx99 Differential Revision: D49078898 Pulled By: xuzhao9 fbshipit-source-id: 17f4b54f2fdbc1cf0a967e0b3c1c8e98dc6576b1
1 parent 1e7bcd0 commit e768fd3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docker/gcp-a100-runner-dind.dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ RUN sudo apt-get -y update && sudo apt -y update
1313
RUN sudo apt-get install -y git jq \
1414
vim wget curl ninja-build cmake \
1515
libgl1-mesa-glx libsndfile1-dev kmod libxml2-dev libxslt1-dev \
16-
fontconfig libfontconfig1-dev
16+
fontconfig libfontconfig1-dev \
17+
libpango-1.0-0 libpangoft2-1.0-0
1718

1819
# get switch-cuda utility
1920
RUN sudo wget -q https://raw.githubusercontent.com/phohenecker/switch-cuda/master/switch-cuda.sh -O /usr/bin/switch-cuda.sh

utils/cuda_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ def install_torch_build_deps(cuda_version: str):
112112
subprocess.check_call(cmd)
113113

114114
def install_torchbench_deps():
115+
# weasyprint requires ffi7, which requires glib > 2.69 on ubuntu 20.04
116+
conda_deps = ["glib"]
117+
cmd = ["conda", "install", "-y"] + conda_deps
118+
subprocess.check_call(cmd)
115119
cmd = ["pip", "install", "unittest-xml-reporting", "boto3"]
116120
subprocess.check_call(cmd)
117121

0 commit comments

Comments
 (0)