Skip to content

Commit 87b8492

Browse files
authored
Merge pull request #5782 from plotly/docker-install-deps
Add a compact script to help install kaleido and fonts in the docker
2 parents 78ef953 + a2ba77e commit 87b8492

File tree

2 files changed

+8
-25
lines changed

2 files changed

+8
-25
lines changed

.circleci/config.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -87,31 +87,8 @@ jobs:
8787
- attach_workspace:
8888
at: ~/
8989
- run:
90-
name: which pip3 version
91-
command: which pip3 && pip3 --version
92-
- run:
93-
name: install kaleido v0.2.1
94-
command: python3 -m pip install kaleido==0.2.1
95-
- run:
96-
name: install plotly.io v5.0.0
97-
command: python3 -m pip install plotly==5.0.0
98-
- run:
99-
name: install liberation2 fonts
100-
command: sudo apt-get install fonts-liberation2
101-
- run:
102-
name: install OpenSans fonts
103-
command: sudo apt-get install fonts-open-sans
104-
- run:
105-
name: install NotoSansCJK fonts
106-
command: sudo apt install fonts-noto-cjk
107-
- run:
108-
name: download google fonts e.g. Dosis, GravitasOne, NotoSansMono, NotoSans, NotoSerif, Old_Standard_TT, PT_Sans_Narrow, Raleway and Roboto
109-
command: python3 .circleci/download_google_fonts.py
110-
- run:
111-
name: install downloaded google fonts
112-
command: |
113-
sudo cp -r .circleci/fonts/ /usr/share/
114-
sudo fc-cache -f
90+
name: install kaleido, plotly.io and required fonts
91+
command: .circleci/env_image.sh
11592
- run:
11693
name: create all png files
11794
command: .circleci/test.sh make-baselines

.circleci/env_image.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk && \
3+
sudo python3 .circleci/download_google_fonts.py && \
4+
sudo cp -r .circleci/fonts/ /usr/share/ && \
5+
sudo fc-cache -f && \
6+
sudo python3 -m pip install kaleido==0.2.1 plotly==5.1.0

0 commit comments

Comments
 (0)