Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Feb 4, 2024
1 parent a09b14e commit 432571e
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .devcontainer/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# We could use renv.lock approach here instead, but will force re-creation of environment from scratch
# Does not provide a good way to ensure that sf/terra/gdalcubes are installed from source while other packages can be binary

install.packages(c("rstac", "spData", "earthdatalogin", "quarto"))
remotes::install_github('r-tmap/tmap')
install.packages(c("rstac", "spData", "earthdatalogin", "quarto", "pak"))
pak::pkg_install('github::r-tmap/tmap')

# vscode and jupyter plugins
#install.packages(c("IRkernel", "languageserver", "httpgd"))
#IRkernel::installspec()

install.packages(c("IRkernel", "languageserver", "httpgd"))
IRkernel::installspec()
32 changes: 32 additions & 0 deletions .devcontainer/jupyter-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
ipykernel
ipython
ipywidgets
jupyter
jupyter-console
jupyter-events
jupyter-lsp
jupyter_client
jupyter_core
jupyter_server
jupyter_server_terminals
jupyterlab
jupyterlab-pygments
jupyterlab-widgets
jupyterlab_server
nbclient
nbconvert
nbformat
notebook
notebook_shim
pandocfilters
Glances
# extensions
jupyterlab-git
jupyter-tensorboard-proxy
jupyter-resource-usage
jupyter-vscode-proxy
jupyter-book
jupyterlab_myst
gh-scoped-creds
jupyter-server-proxy

38 changes: 38 additions & 0 deletions .devcontainer/jupyterhub.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## devcontainer-focused Rocker
FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3

## latest version of geospatial libs
RUN /rocker_scripts/experimental/install_dev_osgeo.sh
RUN apt-get update -qq && apt-get -y install vim

# standard python/jupyter setup
ENV NB_USER=rstudio
ENV VIRTUAL_ENV=/opt/venv
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}
RUN /rocker_scripts/install_python.sh && \
chown ${NB_USER}:staff -R ${VIRTUAL_ENV}

# podman doesn't not understand group permissions
RUN chown ${NB_USER}:staff -R ${R_HOME}/site-library

# some teaching preferences
RUN git config --system pull.rebase false && \
git config --system credential.helper 'cache --timeout=36000'

## codeserver
RUN curl -fsSL https://code-server.dev/install.sh | sh

USER rstudio
WORKDIR /home/rstudio
RUN usermod -s /bin/bash rstudio
ENV PATH=$PATH:/home/rstudio/.local/bin

COPY jupyter-requirements.txt jupyter-requirements.txt
RUN python -m pip install -r jupyter-requirements.txt && rm jupyter-requirements.txt

COPY nasa-requirements.txt requirements.txt
RUN python -m pip install -r requirements.txt && rm requirements.txt

COPY install.R install.R
RUN Rscript install.R && rm install.R

31 changes: 31 additions & 0 deletions .devcontainer/nasa-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
jupyterhub
jupyterlab
notebook
jupyter-rsession-proxy
jupyter-console==6.6.3
jupyter-events==0.7.0
jupyter-lsp==2.2.0
jupyter_client==8.3.1
jupyter_core==5.3.2
jupyter_server==2.7.3
jupyter_server_terminals==0.4.4
jupyter-vscode-proxy==0.5
jupyterlab-pygments==0.2.2
jupyterlab-widgets==3.0.9
jupyterlab_server==2.25.0
nbconvert==7.8.0
nbformat==5.9.2
odc-stac==0.3.8
planetary-computer==1.0.0
polars
pyarrow
pystac-client==0.7.5
gh-scoped-creds
scikit-image
hvplot
geoviews
earthaccess
pyresample
contextily
pygeoweaver

27 changes: 27 additions & 0 deletions .github/workflows/test-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
workflow_dispatch:
push:
branches: main
schedule:
- cron: "0 0 1 * *" # monthly

name: Quarto Test Build

jobs:
build-deploy:
runs-on: ubuntu-latest
container:
image: ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest
options: --user root --security-opt seccomp=unconfined
permissions:
contents: write
steps:
- name: Quarto-inside-docker permissions
run: git config --system --add safe.directory '*'

- name: Check out repository
uses: actions/checkout@v3

- name: Render
run: |
quarto render --no-cache

0 comments on commit 432571e

Please sign in to comment.