/
postBuild
20 lines (17 loc) · 1.23 KB
/
postBuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# This postBuild file is taken from https://github.com/fomightez/orca-plotly-binderized/blob/master/postBuild
# Download orca AppImage, extract it, and make it executable under xvfb
wget https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -P .
chmod 777 orca-1.2.1-x86_64.AppImage
# To avoid the need for FUSE, extract the AppImage into a directory (name squashfs-root by default)
# Note about first line: the Dockerfile used the absolute location, I want to try executing with relative and
# so taking advantage of what is covered in https://unix.stackexchange.com/questions/194142/why-when-we-run-a-executable-file-we-need-to-add-ahead
./orca-1.2.1-x86_64.AppImage --appimage-extract
rm orca-1.2.1-x86_64.AppImage
# The implementation of the last steps of the mathieuboudreau's Dockerfile are based on getting the installed items in the path
# in a binder-compatible way that is done in
# https://github.com/aborruso/bashnotebook/blob/626d3781460b459e525eb2758772d70ec7e650fe/binder/postBuild
mkdir -p ~/.local/bin
printf '#!/bin/bash \nxvfb-run --auto-servernum --server-args "-screen 0 640x480x24" ./squashfs-root/app/orca "$@"' > ~/.local/bin/orca
chmod 777 ~/.local/bin/orca
chmod -R 777 squashfs-root/