Skip to content

Commit

Permalink
uw3_env 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoresi committed Mar 20, 2024
1 parent 0cc8cac commit 6ecd3c0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 84 deletions.
84 changes: 1 addition & 83 deletions .binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,86 +1,5 @@
#!/bin/bash -v

# # determine which version of Quarto to install
# QUARTO_VERSION=1.4.550

# # See whether we need to lookup a Quarto version
# if [ $QUARTO_VERSION = "prerelease" ]; then
# QUARTO_JSON="_prerelease.json"
# elif [ $QUARTO_VERSION = "release" ]; then
# QUARTO_JSON="_download.json"
# fi

# 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
# fi

# cat > $PYTHON_SCRIPT <<EOF
# import urllib, 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

# fi


# echo
# echo Installing Quarto $QUARTO_VERSION
# echo

# # download and install the deb file
# curl -LO https://github.com/quarto-dev/quarto-cli/releases/download/v$QUARTO_VERSION/quarto-$QUARTO_VERSION-linux-amd64.deb
# dpkg -x quarto-$QUARTO_VERSION-linux-amd64.deb .quarto
# rm -rf quarto-$QUARTO_VERSION-linux-amd64.deb

# # get quarto in the path
# mkdir -p ~/.local/bin
# 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
# echo

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

# # download and extract
# wget -q -O code-server.tar.gz https://github.com/coder/code-server/releases/download/v$CODE_VERSION/code-server-$CODE_VERSION-linux-amd64.tar.gz
# tar xzf code-server.tar.gz
# rm -rf code-server.tar.gz

# # place in hidden folder
# 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

# # 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

# echo
# echo Install uw3_env during postBuild phase
Expand All @@ -92,7 +11,7 @@
# # conda activate notebook
# # mamba install --yes -c jgiordani uw3_env

# conda run -n notebook mamba install -y -c jgiordani uw3_env
conda run -n notebook mamba install -y -c jgiordani uw3_env --force-reinstall


echo
Expand All @@ -114,7 +33,6 @@ echo
# python3 setup.py develop
# python3 setup.py build_ext


conda run -n notebook PYTHONPATH=$CONDA_PREFIX/lib python -c "import petsc4py; print(petsc4py.get_config())"
conda run -n notebook PYTHONPATH=$CONDA_PREFIX/lib python -c "from petsc4py import PETSc"

Expand Down
1 change: 0 additions & 1 deletion .binder/start
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
## it is needed if we install the uw3_env dependencies

export PYTHONPATH=$CONDA_PREFIX/lib/
mamba install -c jgiordani uw3_env --force-reinstall

exec "$@"

0 comments on commit 6ecd3c0

Please sign in to comment.