Skip to content

Commit

Permalink
Update to generated binder
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonstyle committed Sep 8, 2023
1 parent 279d5b8 commit 679d607
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
1 change: 1 addition & 0 deletions apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zip
43 changes: 23 additions & 20 deletions postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# determine which version of Quarto to install
QUARTO_VERSION=prerelease

# See whether we need to lookup a Quarto version
if [ $QUARTO_VERSION = "prerelease" ]; then
QUARTO_JSON="_prerelease.json"
elif [ $QUARTO_VERSION = "release" ]; then
Expand All @@ -14,26 +15,27 @@ if [ $QUARTO_JSON != "" ]; then
# create a python script and run it
PYTHON_SCRIPT=_quarto_version.py
if [ -e $PYTHON_SCRIPT ]; then
rm -rf $PYTHON_SCRIPT
rm -rf $PYTHON_SCRIPT
fi

cat > $PYTHON_SCRIPT <<EOF
import urllib, json
import urllib.request, json
import urllib.request, json
with urllib.request.urlopen("https://quarto.org/docs/download/${QUARTO_JSON}") as url:
data = json.load(url)
print(data['version'])
EOF

QUARTO_VERSION=$(python $PYTHON_SCRIPT)
rm -rf $PYTHON_SCRIPT
rm -rf $PYTHON_SCRIPT

fi


echo
echo Installing Quarto $QUARTO_VERSION...
echo Installing Quarto $QUARTO_VERSION
echo

# download and install the deb file
Expand All @@ -48,25 +50,24 @@ ln -s ~/.quarto/opt/quarto/bin/quarto ~/.local/bin/quarto
# create the proper pandoc symlink to enable visual editor in Quarto extension
ln -s ~/.quarto/opt/quarto/bin/tools/x86_64/pandoc ~/.quarto/opt/quarto/bin/tools/pandoc


echo
echo Installed Quarto $VERSION...
echo Installed Quarto
echo

echo Installing TinyTex...
echo

# install tinytex if needed
echo Installing TinyTex
echo
# install tinytex
quarto install tinytex --no-prompt

echo
echo Installed TinyTex...
echo Installed TinyTex
echo

# TODO: install chromium if needed

echo Configuring VSCode...
echo

echo Configuring VSCode
echo
# download and install VS Code server
CODE_VERSION=4.16.1

Expand All @@ -80,18 +81,20 @@ mv "code-server-$CODE_VERSION-linux-amd64" .code-server

# get code-server in path
mkdir -p ./.local/bin
ln -s ~/.code-server/bin/code-server ~/.local/bin/code-server
ln -s ~/.code-server/bin/code-server ~/.local/bin/code-server

# install extensions
# install vscode extensions
code-server --install-extension ms-python.python
code-server --install-extension sumneko.lua
code-server --install-extension quarto.quarto

echo
echo Configured VSCode...
echo Configured VSCode
echo
# install required python packages
python3 -m pip install jupyter-server-proxy
python3 -m pip install jupyterlab-quarto==0.1.45

# enable the proxy extension in notebook and lab
# TODO: This one support JL4, but need to be sure we can support either
# TODO: need to do the same with installing the jupyter-quarto extension
python3 -m pip install git+https://github.com/trungleduc/jupyter-server-proxy@lab4
echo
echo Completed
echo

0 comments on commit 679d607

Please sign in to comment.