From cc399a2300762d89e8f7281406e10b3d51c6a3c9 Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 1 Feb 2024 19:23:33 +0000 Subject: [PATCH 01/59] :see_no_evil: --- .devcontainer/Dockerfile | 32 + .devcontainer/devcontainer.json | 53 + .devcontainer/install.R | 11 + .devcontainer/python-only-devcontainer.json | 21 + .devcontainer/renv.lock | 1553 +++++++++++++++++++ .devcontainer/requirements.txt | 201 +++ .devcontainer/setup.sh | 6 + .devcontainer/welcome.sh | 16 + .github/workflows/docker-image.yml | 24 + .github/workflows/quarto.yaml | 27 + 10 files changed, 1944 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/install.R create mode 100644 .devcontainer/python-only-devcontainer.json create mode 100644 .devcontainer/renv.lock create mode 100644 .devcontainer/requirements.txt create mode 100755 .devcontainer/setup.sh create mode 100755 .devcontainer/welcome.sh create mode 100644 .github/workflows/docker-image.yml create mode 100644 .github/workflows/quarto.yaml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..98264c9ac --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,32 @@ +# devcontainer-focused Rocker +FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 + + +ENV NB_USER=rstudio +ENV VIRTUAL_ENV=/opt/venv +ENV PATH=${VIRTUAL_ENV}/bin:${PATH} +ADD https://raw.githubusercontent.com/rocker-org/rocker-versioned2/96cdc36e3c6dcd17e7eb4b830ebd7d8147aedf51/scripts/install_python.sh install_python.sh +RUN bash install_python.sh && rm install_python.sh + + +RUN apt-get update && apt-get -y install libxt6 libzmq3-dev gh +ADD https://raw.githubusercontent.com/rocker-org/rocker-versioned2/master/scripts/experimental/install_dev_osgeo.sh install_dev_osgeo.sh +RUN bash install_dev_osgeo.sh && rm install_dev_osgeo.sh + +RUN chown -R rstudio:rstudio /opt/venv + +USER rstudio +WORKDIR /home/rstudio +RUN usermod -s /bin/bash rstudio + +COPY requirements.txt requirements.txt +ENV PATH=$PATH:/home/rstudio/.local/bin + +RUN python -m pip install -r requirements.txt && rm requirements.txt +COPY install.R install.R +RUN Rscript install.R && rm install.R + +RUN python -m ipykernel install --user --name=nasa + +# some teaching preferences +RUN git config --global pull.rebase false diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..e0b59ad15 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,53 @@ +{ + "image": "ghcr.io/boettiger-lab/nasa-tops:latest", + "runArgs": [ "--security-opt", "seccomp=unconfined" ], + "name": "NASA TOPS Environment", + // build image as a github-action and grab instead; faster. + // "build": { + // "dockerfile": "Dockerfile" + //}, + "waitFor": "onCreateCommand", + "features": { + "ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {}, + // Install JupyterLab and IRkernel. + // More info: https://github.com/rocker-org/devcontainer-templates/tree/main/src/r-ver + "ghcr.io/rocker-org/devcontainer-features/r-rig:1": { + "version": "none", + "installJupyterlab": true + } + }, + "customizations": { + "codespaces": { + "openFiles": ["README.md"] + }, + "vscode": { + "settings": { + "r.rterm.linux": "/usr/local/bin/radian", + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "[r]": { + "editor.wordSeparators": "`~!@#%$^&*()-=+[{]}\\|;:'\",<>/?" + } + }, + "extensions": [ + "reditorsupport.r", + "rdebugger.r-debugger", + "ms-toolsai.jupyter", + "ms-python.python" + ] + } + }, + // Forward the RStudio ports + "forwardPorts": [8787], + "portsAttributes": { + "8787": { + "label": "Rstudio", + "requireLocalPort": true, + "onAutoForward": "ignore" + } + }, + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "bash .devcontainer/setup.sh", + "postAttachCommand": "sudo rstudio-server start &> /dev/null && bash .devcontainer/welcome.sh", + "remoteUser": "rstudio" + } diff --git a/.devcontainer/install.R b/.devcontainer/install.R new file mode 100755 index 000000000..671eff4c9 --- /dev/null +++ b/.devcontainer/install.R @@ -0,0 +1,11 @@ +#! /usr/local/bin/Rscript +# install R dependencies + +# 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("IRkernel", "languageserver", "httpgd")) +IRkernel::installspec() diff --git a/.devcontainer/python-only-devcontainer.json b/.devcontainer/python-only-devcontainer.json new file mode 100644 index 000000000..b113da367 --- /dev/null +++ b/.devcontainer/python-only-devcontainer.json @@ -0,0 +1,21 @@ +{ + "image": "mcr.microsoft.com/devcontainers/universal:2", + // "hostRequirements": { + // "cpus": 4 + // }, + "waitFor": "onCreateCommand", + "updateContentCommand": "python3 -m pip install -r requirements.txt", + "postCreateCommand": "", + "customizations": { + "codespaces": { + "openFiles": ["README.md"] + }, + "vscode": { + "extensions": [ + "ms-toolsai.jupyter", + "ms-python.python" + ] + } + } + } + \ No newline at end of file diff --git a/.devcontainer/renv.lock b/.devcontainer/renv.lock new file mode 100644 index 000000000..c72df7a06 --- /dev/null +++ b/.devcontainer/renv.lock @@ -0,0 +1,1553 @@ +{ + "R": { + "Version": "4.2.3", + "Repositories": [ + { + "Name": "CRAN", + "URL": "https://packagemanager.posit.co/cran/2023-04-20" + } + ] + }, + "Packages": { + "BH": { + "Package": "BH", + "Version": "1.81.0-1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "68122010f01c4dcfbe58ce7112f2433d" + }, + "DBI": { + "Package": "DBI", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "b2866e62bab9378c3cc9476a1954226b" + }, + "KernSmooth": { + "Package": "KernSmooth", + "Version": "2.23-20", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "stats" + ], + "Hash": "8dcfa99b14c296bc9f1fd64d52fd3ce7" + }, + "MASS": { + "Package": "MASS", + "Version": "7.3-58.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "graphics", + "methods", + "stats", + "utils" + ], + "Hash": "e02d1a0f6122fd3e634b25b433704344" + }, + "Matrix": { + "Package": "Matrix", + "Version": "1.5-3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "graphics", + "grid", + "lattice", + "methods", + "stats", + "utils" + ], + "Hash": "4006dffe49958d2dd591c17e61e60591" + }, + "R6": { + "Package": "R6", + "Version": "2.5.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "470851b6d5d0ac559e9d01bb352b4021" + }, + "RColorBrewer": { + "Package": "RColorBrewer", + "Version": "1.1-3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "45f0398006e83a5b10b72a90663d8d8c" + }, + "Rcpp": { + "Package": "Rcpp", + "Version": "1.0.11", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods", + "utils" + ], + "Hash": "ae6cbbe1492f4de79c45fce06f967ce8" + }, + "XML": { + "Package": "XML", + "Version": "3.99-0.14", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods", + "utils" + ], + "Hash": "e5c8af79df616c135b21eaeb1dc6bc5c" + }, + "abind": { + "Package": "abind", + "Version": "1.4-5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods", + "utils" + ], + "Hash": "4f57884290cc75ab22f4af9e9d4ca862" + }, + "askpass": { + "Package": "askpass", + "Version": "1.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "sys" + ], + "Hash": "e8a22846fff485f0be3770c2da758713" + }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "543776ae6848fde2f48ff3816d0628bc" + }, + "bit": { + "Package": "bit", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "d242abec29412ce988848d0294b208fd" + }, + "bit64": { + "Package": "bit64", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "bit", + "methods", + "stats", + "utils" + ], + "Hash": "9fe98599ca456d6552421db0d6772d8f" + }, + "bslib": { + "Package": "bslib", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "base64enc", + "cachem", + "grDevices", + "htmltools", + "jquerylib", + "jsonlite", + "memoise", + "mime", + "rlang", + "sass" + ], + "Hash": "a7fbf03946ad741129dc81098722fca1" + }, + "cachem": { + "Package": "cachem", + "Version": "1.0.7", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "fastmap", + "rlang" + ], + "Hash": "cda74447c42f529de601fe4d4050daef" + }, + "class": { + "Package": "class", + "Version": "7.3-21", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "MASS", + "R", + "stats", + "utils" + ], + "Hash": "8ae0d4328e2eb3a582dfd5391a3663b7" + }, + "classInt": { + "Package": "classInt", + "Version": "0.4-10", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "KernSmooth", + "R", + "class", + "e1071", + "grDevices", + "graphics", + "stats" + ], + "Hash": "f5a40793b1ae463a7ffb3902a95bf864" + }, + "cli": { + "Package": "cli", + "Version": "3.6.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "utils" + ], + "Hash": "89e6d8219950eac806ae0c489052048a" + }, + "clipr": { + "Package": "clipr", + "Version": "0.8.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "utils" + ], + "Hash": "3f038e5ac7f41d4ac41ce658c85e3042" + }, + "colorspace": { + "Package": "colorspace", + "Version": "2.1-0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "grDevices", + "graphics", + "methods", + "stats" + ], + "Hash": "f20c47fd52fae58b4e377c37bb8c335b" + }, + "cpp11": { + "Package": "cpp11", + "Version": "0.4.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ed588261931ee3be2c700d22e94a29ab" + }, + "crayon": { + "Package": "crayon", + "Version": "1.5.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "grDevices", + "methods", + "utils" + ], + "Hash": "e8a1e41acf02548751f45c718d55aa6a" + }, + "crosstalk": { + "Package": "crosstalk", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "htmltools", + "jsonlite", + "lazyeval" + ], + "Hash": "6aa54f69598c32177e920eb3402e8293" + }, + "curl": { + "Package": "curl", + "Version": "5.0.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "e4f97056611e8e6b8b852d13b7400cf1" + }, + "dichromat": { + "Package": "dichromat", + "Version": "2.0-0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "stats" + ], + "Hash": "16e66f2a483e124af5fc6582d26005f7" + }, + "digest": { + "Package": "digest", + "Version": "0.6.31", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "utils" + ], + "Hash": "8b708f296afd9ae69f450f9640be8990" + }, + "dplyr": { + "Package": "dplyr", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "cli", + "generics", + "glue", + "lifecycle", + "magrittr", + "methods", + "pillar", + "rlang", + "tibble", + "tidyselect", + "utils", + "vctrs" + ], + "Hash": "eb5742d256a0d9306d85ea68756d8187" + }, + "e1071": { + "Package": "e1071", + "Version": "1.7-13", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "class", + "grDevices", + "graphics", + "methods", + "proxy", + "stats", + "utils" + ], + "Hash": "1046cb48d06cb40c2900d8878f03a0fe" + }, + "earthdatalogin": { + "Package": "earthdatalogin", + "Version": "0.0.0.9000", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "earthdatalogin", + "RemoteUsername": "boettiger-lab", + "RemoteRef": "HEAD", + "RemoteSha": "e788ce9e07f7adf75d8399b80b550271377f78ee", + "Requirements": [ + "fs", + "httr", + "openssl", + "purrr", + "readr", + "utils" + ], + "Hash": "cdcd44cf120a815b850b643e5f85f636" + }, + "ellipsis": { + "Package": "ellipsis", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "rlang" + ], + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.20", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "methods" + ], + "Hash": "4b68aa51edd89a0e044a66e75ae3cc6c" + }, + "fansi": { + "Package": "fansi", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "grDevices", + "utils" + ], + "Hash": "1d9e7ad3c8312a192dea7d3db0274fde" + }, + "farver": { + "Package": "farver", + "Version": "2.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "8106d78941f34855c440ddb946b8f7a5" + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "f7736a18de97dea803bde0a2daaafb27" + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.5.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "htmltools", + "rlang" + ], + "Hash": "1e22b8cabbad1eae951a75e9f8b52378" + }, + "fs": { + "Package": "fs", + "Version": "1.6.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "methods" + ], + "Hash": "f4dcd23b67e33d851d2079f703e8b985" + }, + "gdalcubes": { + "Package": "gdalcubes", + "Version": "0.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "BH", + "R", + "Rcpp", + "jsonlite", + "ncdf4" + ], + "Hash": "78c2ae3c1caeeb19635eb2ff932c4252" + }, + "generics": { + "Package": "generics", + "Version": "0.1.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "methods" + ], + "Hash": "15e9634c0fcd294799e9b2e929ed1b86" + }, + "geojsonsf": { + "Package": "geojsonsf", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "Rcpp", + "geometries", + "jsonify", + "rapidjsonr", + "sfheaders" + ], + "Hash": "8d077646c6713838233e8710910ef92e" + }, + "geometries": { + "Package": "geometries", + "Version": "0.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "Rcpp" + ], + "Hash": "122e8341ead01f3746dd312ecc5ffd28" + }, + "ggplot2": { + "Package": "ggplot2", + "Version": "3.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "MASS", + "R", + "cli", + "glue", + "grDevices", + "grid", + "gtable", + "isoband", + "lifecycle", + "mgcv", + "rlang", + "scales", + "stats", + "tibble", + "vctrs", + "withr" + ], + "Hash": "3a147ee02e85a8941aad9909f1b43b7b" + }, + "glue": { + "Package": "glue", + "Version": "1.6.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "methods" + ], + "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e" + }, + "gridExtra": { + "Package": "gridExtra", + "Version": "2.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "graphics", + "grid", + "gtable", + "utils" + ], + "Hash": "7d7f283939f563670a697165b2cf5560" + }, + "gtable": { + "Package": "gtable", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "glue", + "grid", + "lifecycle", + "rlang" + ], + "Hash": "b44addadb528a0d227794121c00572a0" + }, + "highr": { + "Package": "highr", + "Version": "0.10", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "xfun" + ], + "Hash": "06230136b2d2b9ba5805e1963fa6e890" + }, + "hms": { + "Package": "hms", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "lifecycle", + "methods", + "pkgconfig", + "rlang", + "vctrs" + ], + "Hash": "b59377caa7ed00fa41808342002138f9" + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "base64enc", + "digest", + "ellipsis", + "fastmap", + "grDevices", + "rlang", + "utils" + ], + "Hash": "ba0240784ad50a62165058a27459304a" + }, + "htmlwidgets": { + "Package": "htmlwidgets", + "Version": "1.6.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "htmltools", + "jsonlite", + "knitr", + "rmarkdown", + "yaml" + ], + "Hash": "a865aa85bcb2697f47505bfd70422471" + }, + "httr": { + "Package": "httr", + "Version": "1.4.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "curl", + "jsonlite", + "mime", + "openssl" + ], + "Hash": "f6844033201269bec3ca0097bc6c97b3" + }, + "isoband": { + "Package": "isoband", + "Version": "0.2.7", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "grid", + "utils" + ], + "Hash": "0080607b4a1a7b28979aecef976d8bc2" + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "htmltools" + ], + "Hash": "5aab57a3bd297eee1c1d862735972182" + }, + "jsonify": { + "Package": "jsonify", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "Rcpp", + "rapidjsonr" + ], + "Hash": "49a9775e4f8c96c654b6018739067055" + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "methods" + ], + "Hash": "a4269a09a9b865579b2635c77e572374" + }, + "knitr": { + "Package": "knitr", + "Version": "1.42", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "evaluate", + "highr", + "methods", + "tools", + "xfun", + "yaml" + ], + "Hash": "8329a9bcc82943c8069104d4be3ee22d" + }, + "labeling": { + "Package": "labeling", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "graphics", + "stats" + ], + "Hash": "3d5108641f47470611a32d0bdf357a72" + }, + "lattice": { + "Package": "lattice", + "Version": "0.20-45", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "graphics", + "grid", + "stats", + "utils" + ], + "Hash": "b64cdbb2b340437c4ee047a1f4c4377b" + }, + "lazyeval": { + "Package": "lazyeval", + "Version": "0.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "d908914ae53b04d4c0c0fd72ecc35370" + }, + "leafem": { + "Package": "leafem", + "Version": "0.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "geojsonsf", + "htmltools", + "htmlwidgets", + "leaflet", + "methods", + "png", + "raster", + "sf" + ], + "Hash": "6b43f986a9a0c1c1810b2deec71bfdf2" + }, + "leaflet": { + "Package": "leaflet", + "Version": "2.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "RColorBrewer", + "crosstalk", + "htmltools", + "htmlwidgets", + "jquerylib", + "leaflet.providers", + "magrittr", + "methods", + "png", + "raster", + "scales", + "sp", + "stats", + "viridis", + "xfun" + ], + "Hash": "f73dcc38ff38127bc11ea776786996de" + }, + "leaflet.providers": { + "Package": "leaflet.providers", + "Version": "1.13.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "235cd5abed82d9e6e79eb05eee248983" + }, + "leafsync": { + "Package": "leafsync", + "Version": "0.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmltools", + "htmlwidgets", + "leaflet", + "methods" + ], + "Hash": "819d7169c7d39f0f952473e943375da1" + }, + "lifecycle": { + "Package": "lifecycle", + "Version": "1.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "glue", + "rlang" + ], + "Hash": "001cecbeac1cff9301bdc3775ee46a86" + }, + "lwgeom": { + "Package": "lwgeom", + "Version": "0.2-13", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "Rcpp", + "sf", + "units" + ], + "Hash": "9804362cc0267990ac61a85edeca73ed" + }, + "magrittr": { + "Package": "magrittr", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "7ce2733a9826b3aeb1775d56fd305472" + }, + "memoise": { + "Package": "memoise", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "cachem", + "rlang" + ], + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" + }, + "mgcv": { + "Package": "mgcv", + "Version": "1.8-42", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "Matrix", + "R", + "graphics", + "methods", + "nlme", + "splines", + "stats", + "utils" + ], + "Hash": "3460beba7ccc8946249ba35327ba902a" + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "tools" + ], + "Hash": "18e9c28c1d3ca1560ce30658b22ce104" + }, + "munsell": { + "Package": "munsell", + "Version": "0.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "colorspace", + "methods" + ], + "Hash": "6dfe8bf774944bd5595785e3229d8771" + }, + "ncdf4": { + "Package": "ncdf4", + "Version": "1.21", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a7b262641ef4659767d415c6bb78413f" + }, + "nlme": { + "Package": "nlme", + "Version": "3.1-162", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "graphics", + "lattice", + "stats", + "utils" + ], + "Hash": "0984ce8da8da9ead8643c5cbbb60f83e" + }, + "openssl": { + "Package": "openssl", + "Version": "2.0.6", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "askpass" + ], + "Hash": "0f7cd2962e3044bb940cca4f4b5cecbe" + }, + "pillar": { + "Package": "pillar", + "Version": "1.9.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "cli", + "fansi", + "glue", + "lifecycle", + "rlang", + "utf8", + "utils", + "vctrs" + ], + "Hash": "15da5a8412f317beeee6175fbc76f4bb" + }, + "pkgconfig": { + "Package": "pkgconfig", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "utils" + ], + "Hash": "01f28d4278f15c76cddbea05899c5d6f" + }, + "png": { + "Package": "png", + "Version": "0.1-8", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "bd54ba8a0a5faded999a7aab6e46b374" + }, + "prettyunits": { + "Package": "prettyunits", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "95ef9167b75dde9d2ccc3c7528393e7e" + }, + "progress": { + "Package": "progress", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R6", + "crayon", + "hms", + "prettyunits" + ], + "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" + }, + "proxy": { + "Package": "proxy", + "Version": "0.4-27", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "stats", + "utils" + ], + "Hash": "e0ef355c12942cf7a6b91a6cfaea8b3e" + }, + "purrr": { + "Package": "purrr", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "lifecycle", + "magrittr", + "rlang", + "vctrs" + ], + "Hash": "d71c815267c640f17ddbf7f16144b4bb" + }, + "rapidjsonr": { + "Package": "rapidjsonr", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "88b9f48c93d17cdb811b54079a6a414f" + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" + }, + "raster": { + "Package": "raster", + "Version": "3.6-23", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "Rcpp", + "methods", + "sp", + "terra" + ], + "Hash": "337d6d70f7d6bf78df236a5a53f09db0" + }, + "readr": { + "Package": "readr", + "Version": "2.1.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "cli", + "clipr", + "cpp11", + "crayon", + "hms", + "lifecycle", + "methods", + "rlang", + "tibble", + "tzdb", + "utils", + "vroom" + ], + "Hash": "b5047343b3825f37ad9d3b5d89aa1078" + }, + "renv": { + "Package": "renv", + "Version": "0.17.3", + "Source": "Repository", + "Repository": "RSPM", + "RemoteType": "standard", + "RemotePkgRef": "renv", + "RemoteRef": "renv", + "RemoteRepos": "https://packagemanager.posit.co/cran/__linux__/jammy/2023-04-20", + "RemotePkgPlatform": "x86_64-pc-linux-gnu-ubuntu-22.04", + "RemoteSha": "0.17.3", + "Requirements": [ + "utils" + ], + "Hash": "4543b8cd233ae25c6aba8548be9e747e" + }, + "rlang": { + "Package": "rlang", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "utils" + ], + "Hash": "dc079ccd156cde8647360f473c1fa718" + }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.21", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "bslib", + "evaluate", + "fontawesome", + "htmltools", + "jquerylib", + "jsonlite", + "knitr", + "methods", + "stringr", + "tinytex", + "tools", + "utils", + "xfun", + "yaml" + ], + "Hash": "493df4ae51e2e984952ea4d5c75786a3" + }, + "rstac": { + "Package": "rstac", + "Version": "0.9.2-2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "crayon", + "httr", + "jsonlite", + "lifecycle", + "magrittr", + "utils" + ], + "Hash": "3593eb433ef8af73d2559ca646f777c4" + }, + "s2": { + "Package": "s2", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "Rcpp", + "wk" + ], + "Hash": "f1cbe03bb3346f8e817518ffa20f9f5a" + }, + "sass": { + "Package": "sass", + "Version": "0.4.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R6", + "fs", + "htmltools", + "rappdirs", + "rlang" + ], + "Hash": "2bb4371a4c80115518261866eab6ab11" + }, + "scales": { + "Package": "scales", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "RColorBrewer", + "farver", + "labeling", + "lifecycle", + "munsell", + "rlang", + "viridisLite" + ], + "Hash": "906cb23d2f1c5680b8ce439b44c6fa63" + }, + "sf": { + "Package": "sf", + "Version": "1.0-14", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "DBI", + "R", + "Rcpp", + "classInt", + "grDevices", + "graphics", + "grid", + "magrittr", + "methods", + "s2", + "stats", + "tools", + "units", + "utils" + ], + "Hash": "e2111252a76984ca50bf8d6314348681" + }, + "sfheaders": { + "Package": "sfheaders", + "Version": "0.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "Rcpp", + "geometries" + ], + "Hash": "0b0a55852e87b8f8478efb505eba2ebe" + }, + "sp": { + "Package": "sp", + "Version": "2.0-0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "graphics", + "grid", + "lattice", + "methods", + "stats", + "utils" + ], + "Hash": "2551981e6f85d59c81652bf654d6c3ca" + }, + "spData": { + "Package": "spData", + "Version": "2.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "sp" + ], + "Hash": "3ea10242e71aeba42d28cd183fb00feb" + }, + "stars": { + "Package": "stars", + "Version": "0.6-4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "abind", + "classInt", + "methods", + "parallel", + "rlang", + "sf", + "units" + ], + "Hash": "8b4284bf9fddfb481d516877a2045023" + }, + "stringi": { + "Package": "stringi", + "Version": "1.7.12", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "stats", + "tools", + "utils" + ], + "Hash": "ca8bd84263c77310739d2cf64d84d7c9" + }, + "stringr": { + "Package": "stringr", + "Version": "1.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "magrittr", + "rlang", + "stringi", + "vctrs" + ], + "Hash": "671a4d384ae9d32fc47a14e98bfa3dc8" + }, + "sys": { + "Package": "sys", + "Version": "3.4.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "34c16f1ef796057bfa06d3f4ff818a5d" + }, + "terra": { + "Package": "terra", + "Version": "1.7-46", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "Rcpp", + "methods" + ], + "Hash": "d15182a8a20ffc5880e721bfa1bf4ce9" + }, + "tibble": { + "Package": "tibble", + "Version": "3.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "fansi", + "lifecycle", + "magrittr", + "methods", + "pillar", + "pkgconfig", + "rlang", + "utils", + "vctrs" + ], + "Hash": "a84e2cc86d07289b3b6f5069df7a004c" + }, + "tidyselect": { + "Package": "tidyselect", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "rlang", + "vctrs", + "withr" + ], + "Hash": "79540e5fcd9e0435af547d885f184fd5" + }, + "tinytex": { + "Package": "tinytex", + "Version": "0.45", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "xfun" + ], + "Hash": "e4e357f28c2edff493936b6cb30c3d65" + }, + "tmap": { + "Package": "tmap", + "Version": "3.3-4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "RColorBrewer", + "abind", + "classInt", + "grid", + "htmltools", + "htmlwidgets", + "leafem", + "leaflet", + "leafsync", + "methods", + "rlang", + "sf", + "stars", + "stats", + "tmaptools", + "units", + "utils", + "viridisLite", + "widgetframe" + ], + "Hash": "c65363bc002492caf754352499ce2386" + }, + "tmaptools": { + "Package": "tmaptools", + "Version": "3.1-1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "RColorBrewer", + "XML", + "dichromat", + "grid", + "lwgeom", + "magrittr", + "methods", + "sf", + "stars", + "stats", + "units", + "viridisLite" + ], + "Hash": "dfcb77371df343b663d6668d2d63ac35" + }, + "tzdb": { + "Package": "tzdb", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cpp11" + ], + "Hash": "b2e1cbce7c903eaf23ec05c58e59fb5e" + }, + "units": { + "Package": "units", + "Version": "0.8-4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "Rcpp" + ], + "Hash": "e0fbcea25008a7540c83c2c294135de0" + }, + "utf8": { + "Package": "utf8", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "1fe17157424bb09c48a8b3b550c753bc" + }, + "vctrs": { + "Package": "vctrs", + "Version": "0.6.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "rlang" + ], + "Hash": "a745bda7aff4734c17294bb41d4e4607" + }, + "viridis": { + "Package": "viridis", + "Version": "0.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "ggplot2", + "gridExtra", + "viridisLite" + ], + "Hash": "80cd127bc8c9d3d9f0904ead9a9102f1" + }, + "viridisLite": { + "Package": "viridisLite", + "Version": "0.4.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "62f4b5da3e08d8e5bcba6cac15603f70" + }, + "vroom": { + "Package": "vroom", + "Version": "1.6.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "bit64", + "cli", + "cpp11", + "crayon", + "glue", + "hms", + "lifecycle", + "methods", + "progress", + "rlang", + "stats", + "tibble", + "tidyselect", + "tzdb", + "vctrs", + "withr" + ], + "Hash": "7015a74373b83ffaef64023f4a0f5033" + }, + "widgetframe": { + "Package": "widgetframe", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmltools", + "htmlwidgets", + "magrittr", + "purrr", + "tools", + "utils" + ], + "Hash": "0ee89e6cb58182d39b30a5b506e04808" + }, + "withr": { + "Package": "withr", + "Version": "2.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "grDevices", + "graphics", + "stats" + ], + "Hash": "c0e49a9760983e81e55cdd9be92e7182" + }, + "wk": { + "Package": "wk", + "Version": "0.8.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "aaf7e20556e3125a09d53453814ad339" + }, + "xfun": { + "Package": "xfun", + "Version": "0.38", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "stats", + "tools" + ], + "Hash": "1ed71215d45e85562d3b1b29a068ccec" + }, + "yaml": { + "Package": "yaml", + "Version": "2.3.7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "0d0056cc5383fbc240ccd0cb584bf436" + } + } +} diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt new file mode 100644 index 000000000..03183214f --- /dev/null +++ b/.devcontainer/requirements.txt @@ -0,0 +1,201 @@ +affine==2.4.0 +aiobotocore==2.9.0 +aiohttp==3.9.1 +aioitertools==0.11.0 +aiosignal==1.3.1 +annotated-types==0.6.0 +anyio==4.0.0 +argon2-cffi==23.1.0 +argon2-cffi-bindings==21.2.0 +arrow==1.2.3 +asciitree==0.3.3 +asttokens==2.4.0 +async-lru==2.0.4 +async-timeout==4.0.3 +attrs==23.1.0 +Babel==2.12.1 +backcall==0.2.0 +beautifulsoup4==4.12.2 +bleach==6.0.0 +bokeh==3.3.2 +botocore==1.33.13 +Bottleneck==1.3.7 +bounded-pool-executor==0.0.3 +cachetools==5.3.2 +certifi==2023.7.22 +cf-xarray==0.8.6 +cffi==1.15.1 +cftime==1.6.3 +charset-normalizer==3.2.0 +click==8.1.7 +click-plugins==1.1.1 +cligj==0.7.2 +cloudpickle==2.2.1 +comm==0.1.4 +contourpy==1.1.1 +cycler==0.11.0 +dask==2023.11.0 +debugpy==1.8.0 +decorator==5.1.1 +defusedxml==0.7.1 +distributed==2023.11.0 +earthaccess==0.8.2 +exceptiongroup==1.1.3 +executing==1.2.0 +fasteners==0.19 +fastjsonschema==2.18.0 +Fiona==1.9.4.post1 +flox==0.8.5 +fonttools==4.42.1 +fqdn==1.5.1 +frozenlist==1.4.1 +fsspec==2023.12.2 +geopandas==0.14.0 +geopolars==0.1.0a4 +Glances==3.4.0.3 +h5netcdf==1.3.0 +h5py==3.10.0 +idna==3.4 +importlib-metadata==6.8.0 +importlib-resources==6.1.1 +ipykernel==6.25.2 +ipython==8.15.0 +ipywidgets==8.1.1 +isoduration==20.11.0 +jedi==0.19.0 +Jinja2==3.1.2 +jmespath==1.0.1 +json5==0.9.14 +jsonpointer==2.4 +jsonschema==4.19.1 +jsonschema-specifications==2023.7.1 +jupyter==1.0.0 +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 +jupyterlab==4.0.9 +jupyterlab-pygments==0.2.2 +jupyterlab-widgets==3.0.9 +jupyterlab_server==2.25.0 +kiwisolver==1.4.5 +llvmlite==0.41.1 +locket==1.0.0 +lxml==4.9.4 +lz4==4.3.2 +MarkupSafe==2.1.3 +matplotlib==3.8.0 +matplotlib-inline==0.1.6 +mistune==3.0.1 +msgpack==1.0.7 +multidict==6.0.4 +multimethod==1.10 +nbclient==0.8.0 +nbconvert==7.8.0 +nbformat==5.9.2 +nc-time-axis==1.4.1 +nest-asyncio==1.5.8 +netCDF4==1.6.5 +notebook==7.0.6 +notebook_shim==0.2.3 +numba==0.58.1 +numbagg==0.6.8 +numcodecs==0.12.1 +numpy==1.26.0 +numpy-groupies==0.10.2 +odc-geo==0.4.1 +odc-stac==0.3.8 +overrides==7.4.0 +packaging==23.1 +pandas==2.1.0 +pandocfilters==1.5.0 +parso==0.8.3 +partd==1.4.1 +pexpect==4.8.0 +pickleshare==0.7.5 +Pillow==10.0.1 +planetary-computer==1.0.0 +platformdirs==3.10.0 +polars==0.19.15 +pooch==1.8.0 +pqdm==0.2.0 +prometheus-client==0.17.1 +prompt-toolkit==3.0.39 +psutil==5.9.5 +ptyprocess==0.7.0 +pure-eval==0.2.2 +pyarrow==14.0.1 +pyarrow-hotfix==0.6 +pycparser==2.21 +pydantic==2.5.3 +pydantic_core==2.14.6 +Pygments==2.16.1 +pyparsing==3.1.1 +pyproj==3.6.1 +pystac==1.8.4 +pystac-client==0.7.5 +python-cmr==0.9.0 +python-dateutil==2.8.2 +python-dotenv==1.0.0 +python-json-logger==2.0.7 +pytz==2023.3.post1 +PyYAML==6.0.1 +pyzmq==25.1.1 +qtconsole==5.5.1 +QtPy==2.4.1 +radian==0.6.7 +rasterio==1.3.8 +rasterstats==0.19.0 +rchitect==0.4.2 +referencing==0.30.2 +requests==2.31.0 +rfc3339-validator==0.1.4 +rfc3986-validator==0.1.1 +rioxarray==0.15.0 +rpds-py==0.10.3 +s3fs==2023.12.2 +scipy==1.11.3 +seaborn==0.13.0 +Send2Trash==1.8.2 +shapely==2.0.1 +simplejson==3.19.2 +six==1.16.0 +sniffio==1.3.0 +snuggs==1.4.7 +sortedcontainers==2.4.0 +soupsieve==2.5 +sparse==0.14.0 +stack-data==0.6.2 +stackstac==0.5.0 +tblib==3.0.0 +terminado==0.17.1 +timebudget==0.7.1 +tinycss2==1.2.1 +tinynetrc==1.3.1 +tomli==2.0.1 +toolz==0.12.0 +tornado==6.3.3 +tqdm==4.66.1 +traitlets==5.10.1 +types-python-dateutil==2.8.19.14 +typing_extensions==4.8.0 +tzdata==2023.3 +ujson==5.8.0 +uri-template==1.3.0 +urllib3==2.0.5 +wcwidth==0.2.6 +webcolors==1.13 +webencodings==0.5.1 +websocket-client==1.6.3 +widgetsnbextension==4.0.9 +wrapt==1.16.0 +xarray==2023.8.0 +xesmf==0.8.2 +xyzservices==2023.10.1 +yarl==1.9.4 +zarr==2.16.1 +zict==3.0.0 +zipp==3.17.0 diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 000000000..b89dcf16d --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +sudo cp /etc/rstudio/disable_auth_rserver.conf /etc/rstudio/rserver.conf +sudo sudo bash -c 'echo "USER=rstudio" >>/etc/environment' +sudo /init &> /dev/null & + diff --git a/.devcontainer/welcome.sh b/.devcontainer/welcome.sh new file mode 100755 index 000000000..89aab9b8c --- /dev/null +++ b/.devcontainer/welcome.sh @@ -0,0 +1,16 @@ +mkdir -p ~/.local/share/rstudio/projects_settings +export RPROJ"=$(ls ${CODESPACE_VSCODE_FOLDER}/*.Rproj)" +echo ${RPROJ} > ~/.local/share/rstudio/projects_settings/last-project-path + + +# Construct the message +message="## [Open in RStudio](https://$CODESPACE_NAME-8787.app.github.dev) +" +# Echo the message to the terminal +echo " +👋 Welcome to Codespaces! You are on our custom image. + - It includes runtimes and tools for Python & R using Jupyter, Quarto, or RStudio + +🌐 Open the RStudio editor here: https://$CODESPACE_NAME-8787.app.github.dev + - (This may take a few seconds to load, retry if necessary) +" diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 000000000..3fa257c41 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,24 @@ +name: Docker Image CI +on: + workflow_dispatch: null + push: + paths: ['.devcontainer/*'] +jobs: + build: + runs-on: ubuntu-latest + permissions: write-all + steps: + - uses: actions/checkout@v3 + - name: Login to GitHub Container Registry + if: github.repository == 'eeholmes/earthdata-cloud-cookbook' + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + - name: Build the Docker image + if: github.repository == 'eeholmes/earthdata-cloud-cookbook' + run: docker build .devcontainer --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest + - name: Publish + if: github.repository == 'eeholmes/earthdata-cloud-cookbook' + run: docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest diff --git a/.github/workflows/quarto.yaml b/.github/workflows/quarto.yaml new file mode 100644 index 000000000..58c5eeda6 --- /dev/null +++ b/.github/workflows/quarto.yaml @@ -0,0 +1,27 @@ +on: + workflow_dispatch: + push: + branches: main + +name: Quarto Publish + +jobs: + build-deploy: + runs-on: ubuntu-latest + container: + image: ghcr.io/eeholmes/earthdata-cloud-cookbook + 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: Set up Quarto +# uses: quarto-dev/quarto-actions/setup@v2 + + - name: Render + run: quarto render \ No newline at end of file From 39aba24d5153930af0cc11c6927e39cece7c4ed1 Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Thu, 1 Feb 2024 11:25:48 -0800 Subject: [PATCH 02/59] Update quarto.yaml --- .github/workflows/quarto.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/quarto.yaml b/.github/workflows/quarto.yaml index 58c5eeda6..ca34a20fb 100644 --- a/.github/workflows/quarto.yaml +++ b/.github/workflows/quarto.yaml @@ -3,7 +3,7 @@ on: push: branches: main -name: Quarto Publish +name: Quarto Test Build jobs: build-deploy: @@ -24,4 +24,4 @@ jobs: # uses: quarto-dev/quarto-actions/setup@v2 - name: Render - run: quarto render \ No newline at end of file + run: quarto render From ea7710722d904ae0fd8655ba131795740aa13c52 Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Thu, 1 Feb 2024 11:26:34 -0800 Subject: [PATCH 03/59] test w/o freeze --- .github/workflows/quarto.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/quarto.yaml b/.github/workflows/quarto.yaml index ca34a20fb..c04c34af8 100644 --- a/.github/workflows/quarto.yaml +++ b/.github/workflows/quarto.yaml @@ -24,4 +24,6 @@ jobs: # uses: quarto-dev/quarto-actions/setup@v2 - name: Render - run: quarto render + run: | + rm -rf _freeze + quarto render From dec7e85e98617cafdc39e96fbb0f555c7556a438 Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Thu, 1 Feb 2024 11:28:34 -0800 Subject: [PATCH 04/59] Update quarto.yaml --- .github/workflows/quarto.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/quarto.yaml b/.github/workflows/quarto.yaml index c04c34af8..1be6967ce 100644 --- a/.github/workflows/quarto.yaml +++ b/.github/workflows/quarto.yaml @@ -9,7 +9,7 @@ jobs: build-deploy: runs-on: ubuntu-latest container: - image: ghcr.io/eeholmes/earthdata-cloud-cookbook + image: ghcr.io/boettiger-lab/nasa-tops:latest options: --user root --security-opt seccomp=unconfined permissions: contents: write From 017e846d3288b5e3bd2cd98d68196db0a6c98756 Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Thu, 1 Feb 2024 11:32:57 -0800 Subject: [PATCH 05/59] Update install.R --- .devcontainer/install.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/install.R b/.devcontainer/install.R index 671eff4c9..cba5f7539 100755 --- a/.devcontainer/install.R +++ b/.devcontainer/install.R @@ -7,5 +7,5 @@ install.packages(c("rstac", "spData", "earthdatalogin", "quarto")) remotes::install_github('r-tmap/tmap') -install.packages(c("IRkernel", "languageserver", "httpgd")) +install.packages(c("IRkernel", "languageserver", "httpgd", "aws.s3")) IRkernel::installspec() From 22b91bb4c1731f34c5c8e04bed707d6fa1058e45 Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 1 Feb 2024 16:01:33 -0800 Subject: [PATCH 06/59] revising image --- .devcontainer/Dockerfile | 49 +++++++++++++++++++++++++--------- .devcontainer/conda_init.sh | 3 +++ .devcontainer/install.R | 8 +++--- .devcontainer/requirements.txt | 1 + 4 files changed, 46 insertions(+), 15 deletions(-) create mode 100755 .devcontainer/conda_init.sh diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 98264c9ac..5c00d83cd 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,19 +1,28 @@ -# devcontainer-focused Rocker -FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 +## devcontainer-focused Rocker +FROM docker.io/rocker/binder:4.3 +USER root -ENV NB_USER=rstudio -ENV VIRTUAL_ENV=/opt/venv -ENV PATH=${VIRTUAL_ENV}/bin:${PATH} -ADD https://raw.githubusercontent.com/rocker-org/rocker-versioned2/96cdc36e3c6dcd17e7eb4b830ebd7d8147aedf51/scripts/install_python.sh install_python.sh -RUN bash install_python.sh && rm install_python.sh +## latest version of geospatial libs +RUN /rocker_scripts/experimental/install_dev_osgeo.sh +RUN apt-get update -qq && apt-get -y install vim +# conda +ENV CONDA_ENV=/opt/miniforge3 +ENV PATH=${PATH}:$CONDA_ENV/bin +RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \ + bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_ENV} -RUN apt-get update && apt-get -y install libxt6 libzmq3-dev gh -ADD https://raw.githubusercontent.com/rocker-org/rocker-versioned2/master/scripts/experimental/install_dev_osgeo.sh install_dev_osgeo.sh -RUN bash install_dev_osgeo.sh && rm install_dev_osgeo.sh +RUN chown ${NB_USER}:staff -R ${CONDA_ENV} -RUN chown -R rstudio:rstudio /opt/venv +# podman doesn not understand group permissions +RUN chown ${NB_USER}:staff -R ${VIRTUAL_ENV} +RUN chown ${NB_USER}:staff -R ${R_HOME}/site-library + + + +## codeserver +RUN curl -fsSL https://code-server.dev/install.sh | sh USER rstudio WORKDIR /home/rstudio @@ -26,7 +35,23 @@ RUN python -m pip install -r requirements.txt && rm requirements.txt COPY install.R install.R RUN Rscript install.R && rm install.R -RUN python -m ipykernel install --user --name=nasa +# equivalent path to -n openscapes +ENV MY_ENV=${CONDA_ENV}/envs/openscapes +RUN wget https://github.com/NASA-Openscapes/corn/raw/main/ci/environment.yml && \ + conda env create -p ${MY_ENV} -f environment.yml # some teaching preferences RUN git config --global pull.rebase false + +COPY conda_init.sh /etc/profile.d/conda_init.sh +RUN bash -c conda_init.sh + +# NOTES: +# conda (base) just means $CONDA_ENV/bin/ +# conda (openscapes) means $MY_ENV, identically, $CONDA_ENV/envs/openscapes/bin/ +# Rather than activate it or alter path, we just get it set up as an optional kernel +# We could easily make either the default by putting either bin path at the start of PATH + +RUN $MY_ENV/bin/python -m pip install ipykernel && \ + $MY_ENV/bin/python -m ipykernel install --sys-prefix --name=openscapes + diff --git a/.devcontainer/conda_init.sh b/.devcontainer/conda_init.sh new file mode 100755 index 000000000..12ccce2db --- /dev/null +++ b/.devcontainer/conda_init.sh @@ -0,0 +1,3 @@ +#!/bin/bash +conda init &> /dev/null + diff --git a/.devcontainer/install.R b/.devcontainer/install.R index cba5f7539..85481126a 100755 --- a/.devcontainer/install.R +++ b/.devcontainer/install.R @@ -3,9 +3,11 @@ # 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("pak") install.packages(c("rstac", "spData", "earthdatalogin", "quarto")) -remotes::install_github('r-tmap/tmap') +pak::pkg_install('github::r-tmap/tmap') -install.packages(c("IRkernel", "languageserver", "httpgd", "aws.s3")) +#pak::pkg_install("httpgd") +pak::pkg_install(c("IRkernel", "languageserver")) IRkernel::installspec() + diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt index 03183214f..cd5db62ff 100644 --- a/.devcontainer/requirements.txt +++ b/.devcontainer/requirements.txt @@ -77,6 +77,7 @@ 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==4.0.9 jupyterlab-pygments==0.2.2 jupyterlab-widgets==3.0.9 From 65b2dcb39420c561b666942e0b9bf2ebd07a31a7 Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 1 Feb 2024 16:04:25 -0800 Subject: [PATCH 07/59] fix typo --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 5c00d83cd..c4dc7bea4 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -44,7 +44,7 @@ RUN wget https://github.com/NASA-Openscapes/corn/raw/main/ci/environment.yml && RUN git config --global pull.rebase false COPY conda_init.sh /etc/profile.d/conda_init.sh -RUN bash -c conda_init.sh +RUN bash -c /etc/profile.d/conda_init.sh # NOTES: # conda (base) just means $CONDA_ENV/bin/ From e9b8509ca6f17561dcfb4bc19c4ab5d44f416130 Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 1 Feb 2024 16:25:36 -0800 Subject: [PATCH 08/59] conda as default --- .devcontainer/Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c4dc7bea4..86432c9c6 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -44,7 +44,7 @@ RUN wget https://github.com/NASA-Openscapes/corn/raw/main/ci/environment.yml && RUN git config --global pull.rebase false COPY conda_init.sh /etc/profile.d/conda_init.sh -RUN bash -c /etc/profile.d/conda_init.sh +RUN bash -c "conda init" # NOTES: # conda (base) just means $CONDA_ENV/bin/ @@ -52,6 +52,8 @@ RUN bash -c /etc/profile.d/conda_init.sh # Rather than activate it or alter path, we just get it set up as an optional kernel # We could easily make either the default by putting either bin path at the start of PATH -RUN $MY_ENV/bin/python -m pip install ipykernel && \ - $MY_ENV/bin/python -m ipykernel install --sys-prefix --name=openscapes +RUN ${MY_ENV}/bin/python -m pip install ipykernel && \ + ${MY_ENV}/bin/python -m ipykernel install --sys-prefix --name=openscapes + +ENV PATH=${MY_ENV}/bin:${PATH} From a83285a58142db48a86ee7eb1fd28e78c6716046 Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 1 Feb 2024 16:31:07 -0800 Subject: [PATCH 09/59] tweaks --- .devcontainer/Dockerfile | 8 +++++--- .devcontainer/conda_init.sh | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 86432c9c6..82fcc3142 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -43,9 +43,6 @@ RUN wget https://github.com/NASA-Openscapes/corn/raw/main/ci/environment.yml && # some teaching preferences RUN git config --global pull.rebase false -COPY conda_init.sh /etc/profile.d/conda_init.sh -RUN bash -c "conda init" - # NOTES: # conda (base) just means $CONDA_ENV/bin/ # conda (openscapes) means $MY_ENV, identically, $CONDA_ENV/envs/openscapes/bin/ @@ -57,3 +54,8 @@ RUN ${MY_ENV}/bin/python -m pip install ipykernel && \ ENV PATH=${MY_ENV}/bin:${PATH} +COPY conda_init.sh /etc/profile.d/conda_init.sh +RUN bash -c /etc/profile.d/conda_init.sh + + + diff --git a/.devcontainer/conda_init.sh b/.devcontainer/conda_init.sh index 12ccce2db..a4af87cc9 100755 --- a/.devcontainer/conda_init.sh +++ b/.devcontainer/conda_init.sh @@ -1,3 +1,5 @@ #!/bin/bash + conda init &> /dev/null +bash From de2e1b026aef473b8785e61771bd6296fdcd93f1 Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 1 Feb 2024 16:35:01 -0800 Subject: [PATCH 10/59] use local docker image --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e0b59ad15..de31a31bb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ { - "image": "ghcr.io/boettiger-lab/nasa-tops:latest", + "image": "ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest", "runArgs": [ "--security-opt", "seccomp=unconfined" ], - "name": "NASA TOPS Environment", + "name": "NASA OpenScapes Environment", // build image as a github-action and grab instead; faster. // "build": { // "dockerfile": "Dockerfile" From b759cc0a31a5eb793ff83921b2f34e8ac46f8c4a Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 1 Feb 2024 16:45:04 -0800 Subject: [PATCH 11/59] not default --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 82fcc3142..7b20ed69f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -52,7 +52,7 @@ RUN git config --global pull.rebase false RUN ${MY_ENV}/bin/python -m pip install ipykernel && \ ${MY_ENV}/bin/python -m ipykernel install --sys-prefix --name=openscapes -ENV PATH=${MY_ENV}/bin:${PATH} +#ENV PATH=${MY_ENV}/bin:${PATH} COPY conda_init.sh /etc/profile.d/conda_init.sh RUN bash -c /etc/profile.d/conda_init.sh From 53ecd2438cf392afb426b5a262967117024e9141 Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Thu, 1 Feb 2024 18:00:09 -0800 Subject: [PATCH 12/59] codespaces badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 614ec6d0d..1fdeeab4f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.7786710.svg)](https://zenodo.org/record/7786710) - +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/eeholmes/earthdata-cloud-cookbook?quickstart=1&editor=jupyter) # Hello! From b8a61ee2693c77ed483cd45d76070c46e5115264 Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 1 Feb 2024 18:56:48 -0800 Subject: [PATCH 13/59] simpler --- .devcontainer/Dockerfile | 12 ++++-------- .devcontainer/requirements.txt | 2 ++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 7b20ed69f..569fbdb9b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -40,9 +40,6 @@ ENV MY_ENV=${CONDA_ENV}/envs/openscapes RUN wget https://github.com/NASA-Openscapes/corn/raw/main/ci/environment.yml && \ conda env create -p ${MY_ENV} -f environment.yml -# some teaching preferences -RUN git config --global pull.rebase false - # NOTES: # conda (base) just means $CONDA_ENV/bin/ # conda (openscapes) means $MY_ENV, identically, $CONDA_ENV/envs/openscapes/bin/ @@ -50,12 +47,11 @@ RUN git config --global pull.rebase false # We could easily make either the default by putting either bin path at the start of PATH RUN ${MY_ENV}/bin/python -m pip install ipykernel && \ - ${MY_ENV}/bin/python -m ipykernel install --sys-prefix --name=openscapes + ${MY_ENV}/bin/python -m ipykernel install --prefix /opt/venv --name=openscapes -#ENV PATH=${MY_ENV}/bin:${PATH} - -COPY conda_init.sh /etc/profile.d/conda_init.sh -RUN bash -c /etc/profile.d/conda_init.sh +# some teaching preferences +RUN git config --system pull.rebase false && \ + git config --system credential.helper 'cache --timeout=36000' diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt index cd5db62ff..ab9cefdb9 100644 --- a/.devcontainer/requirements.txt +++ b/.devcontainer/requirements.txt @@ -200,3 +200,5 @@ yarl==1.9.4 zarr==2.16.1 zict==3.0.0 zipp==3.17.0 +gh-scoped-creds + From 593311ac8593bafc374978c3ab38a2bc8189e87e Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 1 Feb 2024 19:10:23 -0800 Subject: [PATCH 14/59] use images --- .github/workflows/quarto-publish.yml | 59 +++++++------------ .../{quarto.yaml => test-build.yaml} | 3 - 2 files changed, 22 insertions(+), 40 deletions(-) rename .github/workflows/{quarto.yaml => test-build.yaml} (87%) diff --git a/.github/workflows/quarto-publish.yml b/.github/workflows/quarto-publish.yml index 90cec110a..dbcd7caaf 100644 --- a/.github/workflows/quarto-publish.yml +++ b/.github/workflows/quarto-publish.yml @@ -1,44 +1,29 @@ -name: Render and deploy quarto files on: + workflow_dispatch: push: - branches: - - main + branches: main + +name: Quarto Publish jobs: - quarto-render-and-deploy: + build-deploy: runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} + container: + image: ghcr.io/boettiger-lab/nasa-tops:latest + options: --user root --security-opt seccomp=unconfined + permissions: + contents: write steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 - with: - python-version: 3.8 - channels: conda-forge - miniforge-variant: Mambaforge - activate-environment: quarto-import - environment-file: _import/environment.yml - - - name: "Import external notebooks" - working-directory: ./_import - run: | - conda info - pytest - python quarto_import.py -f assets.json - - - name: Set up Quarto - uses: quarto-dev/quarto-actions/setup@v2 - with: - # To install LaTeX to build PDF book - tinytex: true - # uncomment below and fill to pin a version - # version: 0.9.600 + - name: Quarto-inside-docker permissions + run: git config --system --add safe.directory '*' + + - name: Check out repository + uses: actions/checkout@v3 - - name: Publish to GitHub Pages (and render) - uses: quarto-dev/quarto-actions/publish@v2 - with: - target: gh-pages - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions - + - name: Render and Publish + if: github.repository == 'NASA-Openscapes/earthdata-cloud-cookbook' + uses: quarto-dev/quarto-actions/publish@v2 + with: + target: gh-pages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/quarto.yaml b/.github/workflows/test-build.yaml similarity index 87% rename from .github/workflows/quarto.yaml rename to .github/workflows/test-build.yaml index 1be6967ce..ffedcd8f5 100644 --- a/.github/workflows/quarto.yaml +++ b/.github/workflows/test-build.yaml @@ -20,9 +20,6 @@ jobs: - name: Check out repository uses: actions/checkout@v3 -# - name: Set up Quarto -# uses: quarto-dev/quarto-actions/setup@v2 - - name: Render run: | rm -rf _freeze From 505c0f4a567d5955150c412fa34d1b03a2d40e82 Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 1 Feb 2024 19:13:32 -0800 Subject: [PATCH 15/59] minimal --- .devcontainer/conda_init.sh | 5 - .devcontainer/devcontainer.json | 54 +- .devcontainer/renv.lock | 1553 ------------------------------- .devcontainer/setup.sh | 6 - .devcontainer/welcome.sh | 16 - 5 files changed, 3 insertions(+), 1631 deletions(-) delete mode 100755 .devcontainer/conda_init.sh delete mode 100644 .devcontainer/renv.lock delete mode 100755 .devcontainer/setup.sh delete mode 100755 .devcontainer/welcome.sh diff --git a/.devcontainer/conda_init.sh b/.devcontainer/conda_init.sh deleted file mode 100755 index a4af87cc9..000000000 --- a/.devcontainer/conda_init.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -conda init &> /dev/null -bash - diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index de31a31bb..2621de76f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,53 +1,5 @@ { - "image": "ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest", + "image": "docker.io/cboettig/nasa", "runArgs": [ "--security-opt", "seccomp=unconfined" ], - "name": "NASA OpenScapes Environment", - // build image as a github-action and grab instead; faster. - // "build": { - // "dockerfile": "Dockerfile" - //}, - "waitFor": "onCreateCommand", - "features": { - "ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {}, - // Install JupyterLab and IRkernel. - // More info: https://github.com/rocker-org/devcontainer-templates/tree/main/src/r-ver - "ghcr.io/rocker-org/devcontainer-features/r-rig:1": { - "version": "none", - "installJupyterlab": true - } - }, - "customizations": { - "codespaces": { - "openFiles": ["README.md"] - }, - "vscode": { - "settings": { - "r.rterm.linux": "/usr/local/bin/radian", - "r.bracketedPaste": true, - "r.plot.useHttpgd": true, - "[r]": { - "editor.wordSeparators": "`~!@#%$^&*()-=+[{]}\\|;:'\",<>/?" - } - }, - "extensions": [ - "reditorsupport.r", - "rdebugger.r-debugger", - "ms-toolsai.jupyter", - "ms-python.python" - ] - } - }, - // Forward the RStudio ports - "forwardPorts": [8787], - "portsAttributes": { - "8787": { - "label": "Rstudio", - "requireLocalPort": true, - "onAutoForward": "ignore" - } - }, - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "bash .devcontainer/setup.sh", - "postAttachCommand": "sudo rstudio-server start &> /dev/null && bash .devcontainer/welcome.sh", - "remoteUser": "rstudio" - } + "name": "NASA OpenScapes Environment" +} diff --git a/.devcontainer/renv.lock b/.devcontainer/renv.lock deleted file mode 100644 index c72df7a06..000000000 --- a/.devcontainer/renv.lock +++ /dev/null @@ -1,1553 +0,0 @@ -{ - "R": { - "Version": "4.2.3", - "Repositories": [ - { - "Name": "CRAN", - "URL": "https://packagemanager.posit.co/cran/2023-04-20" - } - ] - }, - "Packages": { - "BH": { - "Package": "BH", - "Version": "1.81.0-1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "68122010f01c4dcfbe58ce7112f2433d" - }, - "DBI": { - "Package": "DBI", - "Version": "1.1.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods" - ], - "Hash": "b2866e62bab9378c3cc9476a1954226b" - }, - "KernSmooth": { - "Package": "KernSmooth", - "Version": "2.23-20", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "stats" - ], - "Hash": "8dcfa99b14c296bc9f1fd64d52fd3ce7" - }, - "MASS": { - "Package": "MASS", - "Version": "7.3-58.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "graphics", - "methods", - "stats", - "utils" - ], - "Hash": "e02d1a0f6122fd3e634b25b433704344" - }, - "Matrix": { - "Package": "Matrix", - "Version": "1.5-3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "graphics", - "grid", - "lattice", - "methods", - "stats", - "utils" - ], - "Hash": "4006dffe49958d2dd591c17e61e60591" - }, - "R6": { - "Package": "R6", - "Version": "2.5.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "470851b6d5d0ac559e9d01bb352b4021" - }, - "RColorBrewer": { - "Package": "RColorBrewer", - "Version": "1.1-3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "45f0398006e83a5b10b72a90663d8d8c" - }, - "Rcpp": { - "Package": "Rcpp", - "Version": "1.0.11", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "methods", - "utils" - ], - "Hash": "ae6cbbe1492f4de79c45fce06f967ce8" - }, - "XML": { - "Package": "XML", - "Version": "3.99-0.14", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods", - "utils" - ], - "Hash": "e5c8af79df616c135b21eaeb1dc6bc5c" - }, - "abind": { - "Package": "abind", - "Version": "1.4-5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "methods", - "utils" - ], - "Hash": "4f57884290cc75ab22f4af9e9d4ca862" - }, - "askpass": { - "Package": "askpass", - "Version": "1.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "sys" - ], - "Hash": "e8a22846fff485f0be3770c2da758713" - }, - "base64enc": { - "Package": "base64enc", - "Version": "0.1-3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "543776ae6848fde2f48ff3816d0628bc" - }, - "bit": { - "Package": "bit", - "Version": "4.0.5", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "d242abec29412ce988848d0294b208fd" - }, - "bit64": { - "Package": "bit64", - "Version": "4.0.5", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "bit", - "methods", - "stats", - "utils" - ], - "Hash": "9fe98599ca456d6552421db0d6772d8f" - }, - "bslib": { - "Package": "bslib", - "Version": "0.4.2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "base64enc", - "cachem", - "grDevices", - "htmltools", - "jquerylib", - "jsonlite", - "memoise", - "mime", - "rlang", - "sass" - ], - "Hash": "a7fbf03946ad741129dc81098722fca1" - }, - "cachem": { - "Package": "cachem", - "Version": "1.0.7", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "fastmap", - "rlang" - ], - "Hash": "cda74447c42f529de601fe4d4050daef" - }, - "class": { - "Package": "class", - "Version": "7.3-21", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "MASS", - "R", - "stats", - "utils" - ], - "Hash": "8ae0d4328e2eb3a582dfd5391a3663b7" - }, - "classInt": { - "Package": "classInt", - "Version": "0.4-10", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "KernSmooth", - "R", - "class", - "e1071", - "grDevices", - "graphics", - "stats" - ], - "Hash": "f5a40793b1ae463a7ffb3902a95bf864" - }, - "cli": { - "Package": "cli", - "Version": "3.6.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "utils" - ], - "Hash": "89e6d8219950eac806ae0c489052048a" - }, - "clipr": { - "Package": "clipr", - "Version": "0.8.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "utils" - ], - "Hash": "3f038e5ac7f41d4ac41ce658c85e3042" - }, - "colorspace": { - "Package": "colorspace", - "Version": "2.1-0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "grDevices", - "graphics", - "methods", - "stats" - ], - "Hash": "f20c47fd52fae58b4e377c37bb8c335b" - }, - "cpp11": { - "Package": "cpp11", - "Version": "0.4.3", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "ed588261931ee3be2c700d22e94a29ab" - }, - "crayon": { - "Package": "crayon", - "Version": "1.5.2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "grDevices", - "methods", - "utils" - ], - "Hash": "e8a1e41acf02548751f45c718d55aa6a" - }, - "crosstalk": { - "Package": "crosstalk", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R6", - "htmltools", - "jsonlite", - "lazyeval" - ], - "Hash": "6aa54f69598c32177e920eb3402e8293" - }, - "curl": { - "Package": "curl", - "Version": "5.0.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "e4f97056611e8e6b8b852d13b7400cf1" - }, - "dichromat": { - "Package": "dichromat", - "Version": "2.0-0.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "stats" - ], - "Hash": "16e66f2a483e124af5fc6582d26005f7" - }, - "digest": { - "Package": "digest", - "Version": "0.6.31", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "utils" - ], - "Hash": "8b708f296afd9ae69f450f9640be8990" - }, - "dplyr": { - "Package": "dplyr", - "Version": "1.1.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R6", - "cli", - "generics", - "glue", - "lifecycle", - "magrittr", - "methods", - "pillar", - "rlang", - "tibble", - "tidyselect", - "utils", - "vctrs" - ], - "Hash": "eb5742d256a0d9306d85ea68756d8187" - }, - "e1071": { - "Package": "e1071", - "Version": "1.7-13", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "class", - "grDevices", - "graphics", - "methods", - "proxy", - "stats", - "utils" - ], - "Hash": "1046cb48d06cb40c2900d8878f03a0fe" - }, - "earthdatalogin": { - "Package": "earthdatalogin", - "Version": "0.0.0.9000", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteRepo": "earthdatalogin", - "RemoteUsername": "boettiger-lab", - "RemoteRef": "HEAD", - "RemoteSha": "e788ce9e07f7adf75d8399b80b550271377f78ee", - "Requirements": [ - "fs", - "httr", - "openssl", - "purrr", - "readr", - "utils" - ], - "Hash": "cdcd44cf120a815b850b643e5f85f636" - }, - "ellipsis": { - "Package": "ellipsis", - "Version": "0.3.2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "rlang" - ], - "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" - }, - "evaluate": { - "Package": "evaluate", - "Version": "0.20", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "methods" - ], - "Hash": "4b68aa51edd89a0e044a66e75ae3cc6c" - }, - "fansi": { - "Package": "fansi", - "Version": "1.0.4", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "grDevices", - "utils" - ], - "Hash": "1d9e7ad3c8312a192dea7d3db0274fde" - }, - "farver": { - "Package": "farver", - "Version": "2.1.1", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "8106d78941f34855c440ddb946b8f7a5" - }, - "fastmap": { - "Package": "fastmap", - "Version": "1.1.1", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "f7736a18de97dea803bde0a2daaafb27" - }, - "fontawesome": { - "Package": "fontawesome", - "Version": "0.5.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "htmltools", - "rlang" - ], - "Hash": "1e22b8cabbad1eae951a75e9f8b52378" - }, - "fs": { - "Package": "fs", - "Version": "1.6.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "methods" - ], - "Hash": "f4dcd23b67e33d851d2079f703e8b985" - }, - "gdalcubes": { - "Package": "gdalcubes", - "Version": "0.6.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "BH", - "R", - "Rcpp", - "jsonlite", - "ncdf4" - ], - "Hash": "78c2ae3c1caeeb19635eb2ff932c4252" - }, - "generics": { - "Package": "generics", - "Version": "0.1.3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "methods" - ], - "Hash": "15e9634c0fcd294799e9b2e929ed1b86" - }, - "geojsonsf": { - "Package": "geojsonsf", - "Version": "2.0.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "Rcpp", - "geometries", - "jsonify", - "rapidjsonr", - "sfheaders" - ], - "Hash": "8d077646c6713838233e8710910ef92e" - }, - "geometries": { - "Package": "geometries", - "Version": "0.2.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "Rcpp" - ], - "Hash": "122e8341ead01f3746dd312ecc5ffd28" - }, - "ggplot2": { - "Package": "ggplot2", - "Version": "3.4.2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "MASS", - "R", - "cli", - "glue", - "grDevices", - "grid", - "gtable", - "isoband", - "lifecycle", - "mgcv", - "rlang", - "scales", - "stats", - "tibble", - "vctrs", - "withr" - ], - "Hash": "3a147ee02e85a8941aad9909f1b43b7b" - }, - "glue": { - "Package": "glue", - "Version": "1.6.2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "methods" - ], - "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e" - }, - "gridExtra": { - "Package": "gridExtra", - "Version": "2.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "graphics", - "grid", - "gtable", - "utils" - ], - "Hash": "7d7f283939f563670a697165b2cf5560" - }, - "gtable": { - "Package": "gtable", - "Version": "0.3.3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "cli", - "glue", - "grid", - "lifecycle", - "rlang" - ], - "Hash": "b44addadb528a0d227794121c00572a0" - }, - "highr": { - "Package": "highr", - "Version": "0.10", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "xfun" - ], - "Hash": "06230136b2d2b9ba5805e1963fa6e890" - }, - "hms": { - "Package": "hms", - "Version": "1.1.3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "lifecycle", - "methods", - "pkgconfig", - "rlang", - "vctrs" - ], - "Hash": "b59377caa7ed00fa41808342002138f9" - }, - "htmltools": { - "Package": "htmltools", - "Version": "0.5.5", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "base64enc", - "digest", - "ellipsis", - "fastmap", - "grDevices", - "rlang", - "utils" - ], - "Hash": "ba0240784ad50a62165058a27459304a" - }, - "htmlwidgets": { - "Package": "htmlwidgets", - "Version": "1.6.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "grDevices", - "htmltools", - "jsonlite", - "knitr", - "rmarkdown", - "yaml" - ], - "Hash": "a865aa85bcb2697f47505bfd70422471" - }, - "httr": { - "Package": "httr", - "Version": "1.4.5", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R6", - "curl", - "jsonlite", - "mime", - "openssl" - ], - "Hash": "f6844033201269bec3ca0097bc6c97b3" - }, - "isoband": { - "Package": "isoband", - "Version": "0.2.7", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "grid", - "utils" - ], - "Hash": "0080607b4a1a7b28979aecef976d8bc2" - }, - "jquerylib": { - "Package": "jquerylib", - "Version": "0.1.4", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "htmltools" - ], - "Hash": "5aab57a3bd297eee1c1d862735972182" - }, - "jsonify": { - "Package": "jsonify", - "Version": "1.2.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "Rcpp", - "rapidjsonr" - ], - "Hash": "49a9775e4f8c96c654b6018739067055" - }, - "jsonlite": { - "Package": "jsonlite", - "Version": "1.8.4", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "methods" - ], - "Hash": "a4269a09a9b865579b2635c77e572374" - }, - "knitr": { - "Package": "knitr", - "Version": "1.42", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "evaluate", - "highr", - "methods", - "tools", - "xfun", - "yaml" - ], - "Hash": "8329a9bcc82943c8069104d4be3ee22d" - }, - "labeling": { - "Package": "labeling", - "Version": "0.4.2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "graphics", - "stats" - ], - "Hash": "3d5108641f47470611a32d0bdf357a72" - }, - "lattice": { - "Package": "lattice", - "Version": "0.20-45", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "graphics", - "grid", - "stats", - "utils" - ], - "Hash": "b64cdbb2b340437c4ee047a1f4c4377b" - }, - "lazyeval": { - "Package": "lazyeval", - "Version": "0.2.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "d908914ae53b04d4c0c0fd72ecc35370" - }, - "leafem": { - "Package": "leafem", - "Version": "0.2.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "base64enc", - "geojsonsf", - "htmltools", - "htmlwidgets", - "leaflet", - "methods", - "png", - "raster", - "sf" - ], - "Hash": "6b43f986a9a0c1c1810b2deec71bfdf2" - }, - "leaflet": { - "Package": "leaflet", - "Version": "2.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "RColorBrewer", - "crosstalk", - "htmltools", - "htmlwidgets", - "jquerylib", - "leaflet.providers", - "magrittr", - "methods", - "png", - "raster", - "scales", - "sp", - "stats", - "viridis", - "xfun" - ], - "Hash": "f73dcc38ff38127bc11ea776786996de" - }, - "leaflet.providers": { - "Package": "leaflet.providers", - "Version": "1.13.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "235cd5abed82d9e6e79eb05eee248983" - }, - "leafsync": { - "Package": "leafsync", - "Version": "0.1.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "htmltools", - "htmlwidgets", - "leaflet", - "methods" - ], - "Hash": "819d7169c7d39f0f952473e943375da1" - }, - "lifecycle": { - "Package": "lifecycle", - "Version": "1.0.3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "cli", - "glue", - "rlang" - ], - "Hash": "001cecbeac1cff9301bdc3775ee46a86" - }, - "lwgeom": { - "Package": "lwgeom", - "Version": "0.2-13", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "Rcpp", - "sf", - "units" - ], - "Hash": "9804362cc0267990ac61a85edeca73ed" - }, - "magrittr": { - "Package": "magrittr", - "Version": "2.0.3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "7ce2733a9826b3aeb1775d56fd305472" - }, - "memoise": { - "Package": "memoise", - "Version": "2.0.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "cachem", - "rlang" - ], - "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" - }, - "mgcv": { - "Package": "mgcv", - "Version": "1.8-42", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "Matrix", - "R", - "graphics", - "methods", - "nlme", - "splines", - "stats", - "utils" - ], - "Hash": "3460beba7ccc8946249ba35327ba902a" - }, - "mime": { - "Package": "mime", - "Version": "0.12", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "tools" - ], - "Hash": "18e9c28c1d3ca1560ce30658b22ce104" - }, - "munsell": { - "Package": "munsell", - "Version": "0.5.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "colorspace", - "methods" - ], - "Hash": "6dfe8bf774944bd5595785e3229d8771" - }, - "ncdf4": { - "Package": "ncdf4", - "Version": "1.21", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a7b262641ef4659767d415c6bb78413f" - }, - "nlme": { - "Package": "nlme", - "Version": "3.1-162", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "graphics", - "lattice", - "stats", - "utils" - ], - "Hash": "0984ce8da8da9ead8643c5cbbb60f83e" - }, - "openssl": { - "Package": "openssl", - "Version": "2.0.6", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "askpass" - ], - "Hash": "0f7cd2962e3044bb940cca4f4b5cecbe" - }, - "pillar": { - "Package": "pillar", - "Version": "1.9.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "cli", - "fansi", - "glue", - "lifecycle", - "rlang", - "utf8", - "utils", - "vctrs" - ], - "Hash": "15da5a8412f317beeee6175fbc76f4bb" - }, - "pkgconfig": { - "Package": "pkgconfig", - "Version": "2.0.3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "utils" - ], - "Hash": "01f28d4278f15c76cddbea05899c5d6f" - }, - "png": { - "Package": "png", - "Version": "0.1-8", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "bd54ba8a0a5faded999a7aab6e46b374" - }, - "prettyunits": { - "Package": "prettyunits", - "Version": "1.1.1", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "95ef9167b75dde9d2ccc3c7528393e7e" - }, - "progress": { - "Package": "progress", - "Version": "1.2.2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R6", - "crayon", - "hms", - "prettyunits" - ], - "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" - }, - "proxy": { - "Package": "proxy", - "Version": "0.4-27", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "stats", - "utils" - ], - "Hash": "e0ef355c12942cf7a6b91a6cfaea8b3e" - }, - "purrr": { - "Package": "purrr", - "Version": "1.0.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "cli", - "lifecycle", - "magrittr", - "rlang", - "vctrs" - ], - "Hash": "d71c815267c640f17ddbf7f16144b4bb" - }, - "rapidjsonr": { - "Package": "rapidjsonr", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "88b9f48c93d17cdb811b54079a6a414f" - }, - "rappdirs": { - "Package": "rappdirs", - "Version": "0.3.3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "5e3c5dc0b071b21fa128676560dbe94d" - }, - "raster": { - "Package": "raster", - "Version": "3.6-23", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "Rcpp", - "methods", - "sp", - "terra" - ], - "Hash": "337d6d70f7d6bf78df236a5a53f09db0" - }, - "readr": { - "Package": "readr", - "Version": "2.1.4", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R6", - "cli", - "clipr", - "cpp11", - "crayon", - "hms", - "lifecycle", - "methods", - "rlang", - "tibble", - "tzdb", - "utils", - "vroom" - ], - "Hash": "b5047343b3825f37ad9d3b5d89aa1078" - }, - "renv": { - "Package": "renv", - "Version": "0.17.3", - "Source": "Repository", - "Repository": "RSPM", - "RemoteType": "standard", - "RemotePkgRef": "renv", - "RemoteRef": "renv", - "RemoteRepos": "https://packagemanager.posit.co/cran/__linux__/jammy/2023-04-20", - "RemotePkgPlatform": "x86_64-pc-linux-gnu-ubuntu-22.04", - "RemoteSha": "0.17.3", - "Requirements": [ - "utils" - ], - "Hash": "4543b8cd233ae25c6aba8548be9e747e" - }, - "rlang": { - "Package": "rlang", - "Version": "1.1.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "utils" - ], - "Hash": "dc079ccd156cde8647360f473c1fa718" - }, - "rmarkdown": { - "Package": "rmarkdown", - "Version": "2.21", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "bslib", - "evaluate", - "fontawesome", - "htmltools", - "jquerylib", - "jsonlite", - "knitr", - "methods", - "stringr", - "tinytex", - "tools", - "utils", - "xfun", - "yaml" - ], - "Hash": "493df4ae51e2e984952ea4d5c75786a3" - }, - "rstac": { - "Package": "rstac", - "Version": "0.9.2-2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "crayon", - "httr", - "jsonlite", - "lifecycle", - "magrittr", - "utils" - ], - "Hash": "3593eb433ef8af73d2559ca646f777c4" - }, - "s2": { - "Package": "s2", - "Version": "1.1.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "Rcpp", - "wk" - ], - "Hash": "f1cbe03bb3346f8e817518ffa20f9f5a" - }, - "sass": { - "Package": "sass", - "Version": "0.4.5", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R6", - "fs", - "htmltools", - "rappdirs", - "rlang" - ], - "Hash": "2bb4371a4c80115518261866eab6ab11" - }, - "scales": { - "Package": "scales", - "Version": "1.2.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R6", - "RColorBrewer", - "farver", - "labeling", - "lifecycle", - "munsell", - "rlang", - "viridisLite" - ], - "Hash": "906cb23d2f1c5680b8ce439b44c6fa63" - }, - "sf": { - "Package": "sf", - "Version": "1.0-14", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "DBI", - "R", - "Rcpp", - "classInt", - "grDevices", - "graphics", - "grid", - "magrittr", - "methods", - "s2", - "stats", - "tools", - "units", - "utils" - ], - "Hash": "e2111252a76984ca50bf8d6314348681" - }, - "sfheaders": { - "Package": "sfheaders", - "Version": "0.4.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "Rcpp", - "geometries" - ], - "Hash": "0b0a55852e87b8f8478efb505eba2ebe" - }, - "sp": { - "Package": "sp", - "Version": "2.0-0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "grDevices", - "graphics", - "grid", - "lattice", - "methods", - "stats", - "utils" - ], - "Hash": "2551981e6f85d59c81652bf654d6c3ca" - }, - "spData": { - "Package": "spData", - "Version": "2.2.2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "sp" - ], - "Hash": "3ea10242e71aeba42d28cd183fb00feb" - }, - "stars": { - "Package": "stars", - "Version": "0.6-4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "abind", - "classInt", - "methods", - "parallel", - "rlang", - "sf", - "units" - ], - "Hash": "8b4284bf9fddfb481d516877a2045023" - }, - "stringi": { - "Package": "stringi", - "Version": "1.7.12", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "stats", - "tools", - "utils" - ], - "Hash": "ca8bd84263c77310739d2cf64d84d7c9" - }, - "stringr": { - "Package": "stringr", - "Version": "1.5.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "magrittr", - "rlang", - "stringi", - "vctrs" - ], - "Hash": "671a4d384ae9d32fc47a14e98bfa3dc8" - }, - "sys": { - "Package": "sys", - "Version": "3.4.1", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "34c16f1ef796057bfa06d3f4ff818a5d" - }, - "terra": { - "Package": "terra", - "Version": "1.7-46", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "Rcpp", - "methods" - ], - "Hash": "d15182a8a20ffc5880e721bfa1bf4ce9" - }, - "tibble": { - "Package": "tibble", - "Version": "3.2.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "fansi", - "lifecycle", - "magrittr", - "methods", - "pillar", - "pkgconfig", - "rlang", - "utils", - "vctrs" - ], - "Hash": "a84e2cc86d07289b3b6f5069df7a004c" - }, - "tidyselect": { - "Package": "tidyselect", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "rlang", - "vctrs", - "withr" - ], - "Hash": "79540e5fcd9e0435af547d885f184fd5" - }, - "tinytex": { - "Package": "tinytex", - "Version": "0.45", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "xfun" - ], - "Hash": "e4e357f28c2edff493936b6cb30c3d65" - }, - "tmap": { - "Package": "tmap", - "Version": "3.3-4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "RColorBrewer", - "abind", - "classInt", - "grid", - "htmltools", - "htmlwidgets", - "leafem", - "leaflet", - "leafsync", - "methods", - "rlang", - "sf", - "stars", - "stats", - "tmaptools", - "units", - "utils", - "viridisLite", - "widgetframe" - ], - "Hash": "c65363bc002492caf754352499ce2386" - }, - "tmaptools": { - "Package": "tmaptools", - "Version": "3.1-1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "RColorBrewer", - "XML", - "dichromat", - "grid", - "lwgeom", - "magrittr", - "methods", - "sf", - "stars", - "stats", - "units", - "viridisLite" - ], - "Hash": "dfcb77371df343b663d6668d2d63ac35" - }, - "tzdb": { - "Package": "tzdb", - "Version": "0.3.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "cpp11" - ], - "Hash": "b2e1cbce7c903eaf23ec05c58e59fb5e" - }, - "units": { - "Package": "units", - "Version": "0.8-4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "Rcpp" - ], - "Hash": "e0fbcea25008a7540c83c2c294135de0" - }, - "utf8": { - "Package": "utf8", - "Version": "1.2.3", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "1fe17157424bb09c48a8b3b550c753bc" - }, - "vctrs": { - "Package": "vctrs", - "Version": "0.6.2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "cli", - "glue", - "lifecycle", - "rlang" - ], - "Hash": "a745bda7aff4734c17294bb41d4e4607" - }, - "viridis": { - "Package": "viridis", - "Version": "0.6.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "ggplot2", - "gridExtra", - "viridisLite" - ], - "Hash": "80cd127bc8c9d3d9f0904ead9a9102f1" - }, - "viridisLite": { - "Package": "viridisLite", - "Version": "0.4.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "62f4b5da3e08d8e5bcba6cac15603f70" - }, - "vroom": { - "Package": "vroom", - "Version": "1.6.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "bit64", - "cli", - "cpp11", - "crayon", - "glue", - "hms", - "lifecycle", - "methods", - "progress", - "rlang", - "stats", - "tibble", - "tidyselect", - "tzdb", - "vctrs", - "withr" - ], - "Hash": "7015a74373b83ffaef64023f4a0f5033" - }, - "widgetframe": { - "Package": "widgetframe", - "Version": "0.3.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "htmltools", - "htmlwidgets", - "magrittr", - "purrr", - "tools", - "utils" - ], - "Hash": "0ee89e6cb58182d39b30a5b506e04808" - }, - "withr": { - "Package": "withr", - "Version": "2.5.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "grDevices", - "graphics", - "stats" - ], - "Hash": "c0e49a9760983e81e55cdd9be92e7182" - }, - "wk": { - "Package": "wk", - "Version": "0.8.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "aaf7e20556e3125a09d53453814ad339" - }, - "xfun": { - "Package": "xfun", - "Version": "0.38", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "stats", - "tools" - ], - "Hash": "1ed71215d45e85562d3b1b29a068ccec" - }, - "yaml": { - "Package": "yaml", - "Version": "2.3.7", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "0d0056cc5383fbc240ccd0cb584bf436" - } - } -} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh deleted file mode 100755 index b89dcf16d..000000000 --- a/.devcontainer/setup.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -sudo cp /etc/rstudio/disable_auth_rserver.conf /etc/rstudio/rserver.conf -sudo sudo bash -c 'echo "USER=rstudio" >>/etc/environment' -sudo /init &> /dev/null & - diff --git a/.devcontainer/welcome.sh b/.devcontainer/welcome.sh deleted file mode 100755 index 89aab9b8c..000000000 --- a/.devcontainer/welcome.sh +++ /dev/null @@ -1,16 +0,0 @@ -mkdir -p ~/.local/share/rstudio/projects_settings -export RPROJ"=$(ls ${CODESPACE_VSCODE_FOLDER}/*.Rproj)" -echo ${RPROJ} > ~/.local/share/rstudio/projects_settings/last-project-path - - -# Construct the message -message="## [Open in RStudio](https://$CODESPACE_NAME-8787.app.github.dev) -" -# Echo the message to the terminal -echo " -👋 Welcome to Codespaces! You are on our custom image. - - It includes runtimes and tools for Python & R using Jupyter, Quarto, or RStudio - -🌐 Open the RStudio editor here: https://$CODESPACE_NAME-8787.app.github.dev - - (This may take a few seconds to load, retry if necessary) -" From 76feab110e66a21f3c122f21e1920e5ebaeeb309 Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 1 Feb 2024 19:17:01 -0800 Subject: [PATCH 16/59] deps --- .devcontainer/install.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/install.R b/.devcontainer/install.R index 85481126a..a80731cee 100755 --- a/.devcontainer/install.R +++ b/.devcontainer/install.R @@ -4,7 +4,7 @@ # 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("pak") -install.packages(c("rstac", "spData", "earthdatalogin", "quarto")) +pak::pkg_install(c("rstac", "spData", "earthdatalogin", "quarto", "aws.s3")) pak::pkg_install('github::r-tmap/tmap') #pak::pkg_install("httpgd") From fdeacf52fb1e87bbb632609f00e97d7f331a4b73 Mon Sep 17 00:00:00 2001 From: Carl Date: Fri, 2 Feb 2024 12:58:12 -0800 Subject: [PATCH 17/59] permissions --- .devcontainer/Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 569fbdb9b..d57715101 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,11 +1,10 @@ ## devcontainer-focused Rocker -FROM docker.io/rocker/binder:4.3 - -USER root +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 +RUN /rocker_scripts/install_jupyter.sh # conda ENV CONDA_ENV=/opt/miniforge3 @@ -19,6 +18,10 @@ RUN chown ${NB_USER}:staff -R ${CONDA_ENV} RUN chown ${NB_USER}:staff -R ${VIRTUAL_ENV} 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 @@ -50,8 +53,4 @@ RUN ${MY_ENV}/bin/python -m pip install ipykernel && \ ${MY_ENV}/bin/python -m ipykernel install --prefix /opt/venv --name=openscapes -# some teaching preferences -RUN git config --system pull.rebase false && \ - git config --system credential.helper 'cache --timeout=36000' - From 51acaf2bc22752f38879e3761d0f88b68ada8379 Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 13:01:39 -0800 Subject: [PATCH 18/59] :broom: --- .devcontainer/Dockerfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d57715101..b785c1b1c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,18 +3,22 @@ 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 -RUN /rocker_scripts/install_jupyter.sh +RUN apt-get update -qq && apt-get -y install vim texlive-science -# conda +# standard python/jupyter setup +ENV NB_USER=rstudio +ENV VIRTUAL_ENV=/opt/venv +ENV PATH=${VIRTUAL_ENV}/bin:${PATH} +RUN wget https://github.com/rocker-org/rocker-versioned2/raw/master/scripts/install_jupyter.sh && bash -e install_jupyter.sh && rm install_jupyter.sh + +# Set up conda ENV CONDA_ENV=/opt/miniforge3 ENV PATH=${PATH}:$CONDA_ENV/bin RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \ bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_ENV} - RUN chown ${NB_USER}:staff -R ${CONDA_ENV} -# podman doesn not understand group permissions +# podman doesn't not understand group permissions RUN chown ${NB_USER}:staff -R ${VIRTUAL_ENV} RUN chown ${NB_USER}:staff -R ${R_HOME}/site-library @@ -23,32 +27,28 @@ 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 + +## Openscapes-specific configs USER rstudio WORKDIR /home/rstudio RUN usermod -s /bin/bash rstudio +# install into the default environment COPY requirements.txt requirements.txt -ENV PATH=$PATH:/home/rstudio/.local/bin - RUN python -m pip install -r requirements.txt && rm requirements.txt COPY install.R install.R RUN Rscript install.R && rm install.R -# equivalent path to -n openscapes +# Create a conda-based env and install into it without using conda init/conda activate +# (this yaml file doesn't include everything from pangeo, consider a different one...) ENV MY_ENV=${CONDA_ENV}/envs/openscapes RUN wget https://github.com/NASA-Openscapes/corn/raw/main/ci/environment.yml && \ conda env create -p ${MY_ENV} -f environment.yml -# NOTES: -# conda (base) just means $CONDA_ENV/bin/ -# conda (openscapes) means $MY_ENV, identically, $CONDA_ENV/envs/openscapes/bin/ -# Rather than activate it or alter path, we just get it set up as an optional kernel -# We could easily make either the default by putting either bin path at the start of PATH - +# This won't be the default enviornment but we register it RUN ${MY_ENV}/bin/python -m pip install ipykernel && \ ${MY_ENV}/bin/python -m ipykernel install --prefix /opt/venv --name=openscapes From 1b6fdc710010d7fcfae663a93cbec78ecb978640 Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Sat, 3 Feb 2024 13:59:19 -0800 Subject: [PATCH 19/59] Update test-build.yaml --- .github/workflows/test-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index ffedcd8f5..7747cd9ab 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -9,7 +9,7 @@ jobs: build-deploy: runs-on: ubuntu-latest container: - image: ghcr.io/boettiger-lab/nasa-tops:latest + image: ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest options: --user root --security-opt seccomp=unconfined permissions: contents: write From 9fb213bbd91e159d8c1150b21c8a070da2844ca8 Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Sat, 3 Feb 2024 13:59:48 -0800 Subject: [PATCH 20/59] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2621de76f..bfd91d5d4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "docker.io/cboettig/nasa", + "image": "ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest", "runArgs": [ "--security-opt", "seccomp=unconfined" ], "name": "NASA OpenScapes Environment" } From 93c4a16420ca4c524340084e8dc5d168c81c16ad Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 14:13:47 -0800 Subject: [PATCH 21/59] smaller build --- .devcontainer/Dockerfile | 4 +- .devcontainer/requirements.txt | 187 +-------------------------------- 2 files changed, 4 insertions(+), 187 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b785c1b1c..2fdb13a53 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -2,8 +2,8 @@ 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 texlive-science +# RUN /rocker_scripts/experimental/install_dev_osgeo.sh +RUN apt-get update -qq && apt-get -y install vim texlive-base # standard python/jupyter setup ENV NB_USER=rstudio diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt index ab9cefdb9..640ab367f 100644 --- a/.devcontainer/requirements.txt +++ b/.devcontainer/requirements.txt @@ -1,74 +1,3 @@ -affine==2.4.0 -aiobotocore==2.9.0 -aiohttp==3.9.1 -aioitertools==0.11.0 -aiosignal==1.3.1 -annotated-types==0.6.0 -anyio==4.0.0 -argon2-cffi==23.1.0 -argon2-cffi-bindings==21.2.0 -arrow==1.2.3 -asciitree==0.3.3 -asttokens==2.4.0 -async-lru==2.0.4 -async-timeout==4.0.3 -attrs==23.1.0 -Babel==2.12.1 -backcall==0.2.0 -beautifulsoup4==4.12.2 -bleach==6.0.0 -bokeh==3.3.2 -botocore==1.33.13 -Bottleneck==1.3.7 -bounded-pool-executor==0.0.3 -cachetools==5.3.2 -certifi==2023.7.22 -cf-xarray==0.8.6 -cffi==1.15.1 -cftime==1.6.3 -charset-normalizer==3.2.0 -click==8.1.7 -click-plugins==1.1.1 -cligj==0.7.2 -cloudpickle==2.2.1 -comm==0.1.4 -contourpy==1.1.1 -cycler==0.11.0 -dask==2023.11.0 -debugpy==1.8.0 -decorator==5.1.1 -defusedxml==0.7.1 -distributed==2023.11.0 -earthaccess==0.8.2 -exceptiongroup==1.1.3 -executing==1.2.0 -fasteners==0.19 -fastjsonschema==2.18.0 -Fiona==1.9.4.post1 -flox==0.8.5 -fonttools==4.42.1 -fqdn==1.5.1 -frozenlist==1.4.1 -fsspec==2023.12.2 -geopandas==0.14.0 -geopolars==0.1.0a4 -Glances==3.4.0.3 -h5netcdf==1.3.0 -h5py==3.10.0 -idna==3.4 -importlib-metadata==6.8.0 -importlib-resources==6.1.1 -ipykernel==6.25.2 -ipython==8.15.0 -ipywidgets==8.1.1 -isoduration==20.11.0 -jedi==0.19.0 -Jinja2==3.1.2 -jmespath==1.0.1 -json5==0.9.14 -jsonpointer==2.4 -jsonschema==4.19.1 -jsonschema-specifications==2023.7.1 jupyter==1.0.0 jupyter-console==6.6.3 jupyter-events==0.7.0 @@ -78,127 +7,15 @@ jupyter_core==5.3.2 jupyter_server==2.7.3 jupyter_server_terminals==0.4.4 jupyter-vscode-proxy==0.5 -jupyterlab==4.0.9 jupyterlab-pygments==0.2.2 jupyterlab-widgets==3.0.9 jupyterlab_server==2.25.0 -kiwisolver==1.4.5 -llvmlite==0.41.1 -locket==1.0.0 -lxml==4.9.4 -lz4==4.3.2 -MarkupSafe==2.1.3 -matplotlib==3.8.0 -matplotlib-inline==0.1.6 -mistune==3.0.1 -msgpack==1.0.7 -multidict==6.0.4 -multimethod==1.10 -nbclient==0.8.0 nbconvert==7.8.0 nbformat==5.9.2 -nc-time-axis==1.4.1 -nest-asyncio==1.5.8 -netCDF4==1.6.5 -notebook==7.0.6 -notebook_shim==0.2.3 -numba==0.58.1 -numbagg==0.6.8 -numcodecs==0.12.1 -numpy==1.26.0 -numpy-groupies==0.10.2 -odc-geo==0.4.1 odc-stac==0.3.8 -overrides==7.4.0 -packaging==23.1 -pandas==2.1.0 -pandocfilters==1.5.0 -parso==0.8.3 -partd==1.4.1 -pexpect==4.8.0 -pickleshare==0.7.5 -Pillow==10.0.1 planetary-computer==1.0.0 -platformdirs==3.10.0 -polars==0.19.15 -pooch==1.8.0 -pqdm==0.2.0 -prometheus-client==0.17.1 -prompt-toolkit==3.0.39 -psutil==5.9.5 -ptyprocess==0.7.0 -pure-eval==0.2.2 -pyarrow==14.0.1 -pyarrow-hotfix==0.6 -pycparser==2.21 -pydantic==2.5.3 -pydantic_core==2.14.6 -Pygments==2.16.1 -pyparsing==3.1.1 -pyproj==3.6.1 -pystac==1.8.4 +polars +pyarrow pystac-client==0.7.5 -python-cmr==0.9.0 -python-dateutil==2.8.2 -python-dotenv==1.0.0 -python-json-logger==2.0.7 -pytz==2023.3.post1 -PyYAML==6.0.1 -pyzmq==25.1.1 -qtconsole==5.5.1 -QtPy==2.4.1 -radian==0.6.7 -rasterio==1.3.8 -rasterstats==0.19.0 -rchitect==0.4.2 -referencing==0.30.2 -requests==2.31.0 -rfc3339-validator==0.1.4 -rfc3986-validator==0.1.1 -rioxarray==0.15.0 -rpds-py==0.10.3 -s3fs==2023.12.2 -scipy==1.11.3 -seaborn==0.13.0 -Send2Trash==1.8.2 -shapely==2.0.1 -simplejson==3.19.2 -six==1.16.0 -sniffio==1.3.0 -snuggs==1.4.7 -sortedcontainers==2.4.0 -soupsieve==2.5 -sparse==0.14.0 -stack-data==0.6.2 -stackstac==0.5.0 -tblib==3.0.0 -terminado==0.17.1 -timebudget==0.7.1 -tinycss2==1.2.1 -tinynetrc==1.3.1 -tomli==2.0.1 -toolz==0.12.0 -tornado==6.3.3 -tqdm==4.66.1 -traitlets==5.10.1 -types-python-dateutil==2.8.19.14 -typing_extensions==4.8.0 -tzdata==2023.3 -ujson==5.8.0 -uri-template==1.3.0 -urllib3==2.0.5 -wcwidth==0.2.6 -webcolors==1.13 -webencodings==0.5.1 -websocket-client==1.6.3 -widgetsnbextension==4.0.9 -wrapt==1.16.0 -xarray==2023.8.0 -xesmf==0.8.2 -xyzservices==2023.10.1 -yarl==1.9.4 -zarr==2.16.1 -zict==3.0.0 -zipp==3.17.0 gh-scoped-creds From f79aac0aed36c8baa3f1a7088710d05d5f0969bc Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 15:46:11 -0800 Subject: [PATCH 22/59] use images --- .devcontainer/Dockerfile | 16 +++++++++------- .devcontainer/requirements.txt | 7 +++++++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 2fdb13a53..48cbf4ac2 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,32 +1,34 @@ ## devcontainer-focused Rocker FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 +#RUN /rocker_scripts/install_geospatial.sh ## latest version of geospatial libs -# RUN /rocker_scripts/experimental/install_dev_osgeo.sh -RUN apt-get update -qq && apt-get -y install vim texlive-base +RUN /rocker_scripts/experimental/install_dev_osgeo.sh +RUN apt-get update -qq && apt-get -y install vim texlive # standard python/jupyter setup ENV NB_USER=rstudio ENV VIRTUAL_ENV=/opt/venv ENV PATH=${VIRTUAL_ENV}/bin:${PATH} -RUN wget https://github.com/rocker-org/rocker-versioned2/raw/master/scripts/install_jupyter.sh && bash -e install_jupyter.sh && rm install_jupyter.sh +RUN wget https://github.com/rocker-org/rocker-versioned2/raw/master/scripts/install_jupyter.sh && \ + bash -e install_jupyter.sh && \ + rm install_jupyter.sh && \ + chown ${NB_USER}:staff -R ${VIRTUAL_ENV} # Set up conda ENV CONDA_ENV=/opt/miniforge3 ENV PATH=${PATH}:$CONDA_ENV/bin RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \ - bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_ENV} -RUN chown ${NB_USER}:staff -R ${CONDA_ENV} + bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_ENV} && \ + chown ${NB_USER}:staff -R ${CONDA_ENV} # podman doesn't not understand group permissions -RUN chown ${NB_USER}:staff -R ${VIRTUAL_ENV} 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 diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt index 640ab367f..7a2a4b6b1 100644 --- a/.devcontainer/requirements.txt +++ b/.devcontainer/requirements.txt @@ -18,4 +18,11 @@ polars pyarrow pystac-client==0.7.5 gh-scoped-creds +scikit-image +hvplot +geoviews +earthaccess +pyresample +contextily +pygeoweaver From 950e96ae8150d44893e63c415a2b4efe542daabb Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 20:38:27 -0800 Subject: [PATCH 23/59] conda docker --- .devcontainer/Dockerfile | 1 - .devcontainer/conda.Dockerfile | 47 ++++++++++ .devcontainer/devcontainer.json | 2 +- .devcontainer/environment.yml | 87 +++++++++++++++++++ .devcontainer/install.R | 11 +-- .devcontainer/jupyter-environment.yml | 21 +++++ ...requirements.txt => nasa-requirements.txt} | 5 +- .devcontainer/venv.Dockerfile | 36 ++++++++ .github/workflows/docker-image.yml | 2 +- 9 files changed, 203 insertions(+), 9 deletions(-) create mode 100644 .devcontainer/conda.Dockerfile create mode 100644 .devcontainer/environment.yml create mode 100644 .devcontainer/jupyter-environment.yml rename .devcontainer/{requirements.txt => nasa-requirements.txt} (89%) create mode 100644 .devcontainer/venv.Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 48cbf4ac2..e3b7df4f3 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,6 @@ ## devcontainer-focused Rocker FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 -#RUN /rocker_scripts/install_geospatial.sh ## latest version of geospatial libs RUN /rocker_scripts/experimental/install_dev_osgeo.sh RUN apt-get update -qq && apt-get -y install vim texlive diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile new file mode 100644 index 000000000..0ab2cf93b --- /dev/null +++ b/.devcontainer/conda.Dockerfile @@ -0,0 +1,47 @@ +## 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 + +# podman doesn't not understand group permissions +RUN chown rstudio: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 + +# Set up conda +ENV NB_USER=rstudio +ENV CONDA_ENV=/opt/miniforge3 +ENV PATH=${CONDA_ENV}/bin:${PATH} +RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \ + bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_ENV} && \ + chown ${NB_USER}:staff -R ${CONDA_ENV} + + +# Initialize conda by default for all users: +RUN conda init --system + +## Openscapes-specific configs +USER ${NB_USER} +WORKDIR /home/${NB_USER} +RUN usermod -s /bin/bash ${NB_USER} + +# install into the default environment +COPY install.R install.R +RUN Rscript install.R && rm install.R + +# consider installing jupyter-like stuff into base env instead? +# Create a conda-based env and install into it without using conda init/conda activate +# (this yaml file doesn't include everything from pangeo, consider a different one...) +ENV MY_ENV=${CONDA_ENV}/envs/openscapes +COPY environment.yml environment.yml +RUN conda env create -p ${MY_ENV} -f environment.yml + +ENV PATH=${MY_ENV}/bin:${PATH} + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2621de76f..dfa558902 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "docker.io/cboettig/nasa", + "image": "ghcr.io/eeholmes/earthdata-cloud-cookbook", "runArgs": [ "--security-opt", "seccomp=unconfined" ], "name": "NASA OpenScapes Environment" } diff --git a/.devcontainer/environment.yml b/.devcontainer/environment.yml new file mode 100644 index 000000000..e17a0a114 --- /dev/null +++ b/.devcontainer/environment.yml @@ -0,0 +1,87 @@ +name: openscapes +channels: + - conda-forge +dependencies: + - python=3.10 + - dask + - dask-gateway + - graphviz + - distributed + - rioxarray + - xarray>=2022.12 + - h5netcdf + - netcdf4>=1.6.4 + - h5py + - gdal~=3.8 + - geoviews + - holoviews=1.16.2 + - matplotlib-base + - seaborn + - intake + - hvplot + - datashader + - pyproj + - bqplot + - geopandas + - zarr + - cartopy + - pynco + - rasterio + - shapely + - pyresample + - icepyx + - joblib + - pystac-client + - pydap + - lxml + - ipyleaflet + # when jlab 4 gets released we can upgrade dask-labextension + # - dask-labextension + # - dask-labextension==6.2.0 + - dask-labextension + - jupyter-server-proxy + - jupyter-vscode-proxy + - jupyter-rsession-proxy + - ipywidgets + - jupyter-book + - jupyterlab>4 + - jupyterlab-myst + - jupyterhub-singleuser + - jupyterlab-geojson + - jupyterlab-favorites + - jupyterlab-git + - jupyter-resource-usage + - jupyterlab-h5web + - hdf5plugin + - ipympl + - conda-lock + - pooch + - earthaccess>=0.8.2 + - sliderule>=3.6.0 + # QGIS + - qgis~=3.28 + - pyopencl + - ocl-icd-system + - websockify>=0.10 + # /QGIS + - h5coro + - git >=2.39 + - itslive + - rasterstats + - kerchunk + - rechunker + - pqdm + - spectral + - scikit-image + - coiled + - s3fs + - nbgitpuller + - awscliv2 + - jupyter-server-proxy + - jupyter-vscode-proxy + # https://github.com/jupyterlab/jupyter-collaboration/issues/202 + # - jupyter-collaboration + - code-server >=3.2 + - pip +platforms: + - linux-64 diff --git a/.devcontainer/install.R b/.devcontainer/install.R index a80731cee..f4e85dc93 100755 --- a/.devcontainer/install.R +++ b/.devcontainer/install.R @@ -3,11 +3,12 @@ # 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("pak") -pak::pkg_install(c("rstac", "spData", "earthdatalogin", "quarto", "aws.s3")) -pak::pkg_install('github::r-tmap/tmap') +# Likewise, pak insists on installing old gdal from apt instead of respecting system library source builds +# install.packages("pak") +install.packages(c("rstac", "spData", "earthdatalogin", "quarto", "aws.s3", "tmap")) +remotes::install_github('r-tmap/tmap') #pak::pkg_install("httpgd") -pak::pkg_install(c("IRkernel", "languageserver")) -IRkernel::installspec() +#pak::pkg_install(c("IRkernel", "languageserver")) +#IRkernel::installspec() diff --git a/.devcontainer/jupyter-environment.yml b/.devcontainer/jupyter-environment.yml new file mode 100644 index 000000000..82f71375b --- /dev/null +++ b/.devcontainer/jupyter-environment.yml @@ -0,0 +1,21 @@ +name: openscapes +channels: + - conda-forge +dependencies: + - python=3.10 + - dask-labextension + - jupyter-server-proxy + - jupyter-vscode-proxy + - jupyter-rsession-proxy + - ipywidgets + - jupyter-book + - jupyterlab>4 + - jupyterlab-myst + - jupyterhub-singleuser + - jupyterlab-geojson + - jupyterlab-favorites + - jupyterlab-git + - jupyter-resource-usage + - jupyterlab-h5web + - code-server >=3.2 + - pip diff --git a/.devcontainer/requirements.txt b/.devcontainer/nasa-requirements.txt similarity index 89% rename from .devcontainer/requirements.txt rename to .devcontainer/nasa-requirements.txt index 7a2a4b6b1..c8dc3a7c5 100644 --- a/.devcontainer/requirements.txt +++ b/.devcontainer/nasa-requirements.txt @@ -1,4 +1,7 @@ -jupyter==1.0.0 +jupyterhub +jupyterlab +notebook +jupyter-rsession-proxy jupyter-console==6.6.3 jupyter-events==0.7.0 jupyter-lsp==2.2.0 diff --git a/.devcontainer/venv.Dockerfile b/.devcontainer/venv.Dockerfile new file mode 100644 index 000000000..a91a50b14 --- /dev/null +++ b/.devcontainer/venv.Dockerfile @@ -0,0 +1,36 @@ +## 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 + +## Openscapes-specific configs +USER rstudio +WORKDIR /home/rstudio +RUN usermod -s /bin/bash rstudio + +# install into the default environment +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 + + diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3fa257c41..64ed1c7c3 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -18,7 +18,7 @@ jobs: password: ${{secrets.GITHUB_TOKEN}} - name: Build the Docker image if: github.repository == 'eeholmes/earthdata-cloud-cookbook' - run: docker build .devcontainer --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest + run: docker build .devcontainer -f .devcontainer/conda.Dockerfile --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest - name: Publish if: github.repository == 'eeholmes/earthdata-cloud-cookbook' run: docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest From 487fa62255e031ac0ea0b52fd997b5fdb94fdda6 Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 20:51:33 -0800 Subject: [PATCH 24/59] run monthly using this docker image --- .github/workflows/test-build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index 7747cd9ab..0dc65ed9e 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -2,6 +2,8 @@ on: workflow_dispatch: push: branches: main + schedule: + - cron: "0 0 1 * *" # monthly name: Quarto Test Build @@ -22,5 +24,4 @@ jobs: - name: Render run: | - rm -rf _freeze - quarto render + quarto render --no-cache From 766bdfa3eb6187c4528365bd5586581abbd5a98f Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 22:00:40 -0800 Subject: [PATCH 25/59] build both --- .github/workflows/docker-image.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 64ed1c7c3..3f9e161f1 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -18,7 +18,12 @@ jobs: password: ${{secrets.GITHUB_TOKEN}} - name: Build the Docker image if: github.repository == 'eeholmes/earthdata-cloud-cookbook' - run: docker build .devcontainer -f .devcontainer/conda.Dockerfile --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest + run: | + docker build .devcontainer -f .devcontainer/conda.Dockerfile --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest + docker build .devcontainer -f .devcontainer/venv.Dockerfile --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:venv - name: Publish if: github.repository == 'eeholmes/earthdata-cloud-cookbook' - run: docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest + run: | + docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest + docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:venv + From 58302e52708a1ebbcbab7b38c9cfc303f76b1af1 Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 22:01:06 -0800 Subject: [PATCH 26/59] venv is smaller --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index bfd91d5d4..43f3b554e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest", + "image": "ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:venv", "runArgs": [ "--security-opt", "seccomp=unconfined" ], "name": "NASA OpenScapes Environment" } From f618b7c5d41bfa1b4f856a7fbffc18a12a7f52fc Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 22:22:31 -0800 Subject: [PATCH 27/59] set PATH in Renviron too --- .devcontainer/conda.Dockerfile | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index 0ab2cf93b..4af531664 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -1,7 +1,7 @@ -## devcontainer-focused Rocker +# devcontainer-focused Rocker FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 -## latest version of geospatial libs +# latest version of geospatial libs RUN /rocker_scripts/experimental/install_dev_osgeo.sh RUN apt-get update -qq && apt-get -y install vim @@ -12,7 +12,7 @@ RUN chown rstudio:staff -R ${R_HOME}/site-library RUN git config --system pull.rebase false && \ git config --system credential.helper 'cache --timeout=36000' -## codeserver +# codeserver RUN curl -fsSL https://code-server.dev/install.sh | sh # Set up conda @@ -23,11 +23,15 @@ RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/downloa bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_ENV} && \ chown ${NB_USER}:staff -R ${CONDA_ENV} - # Initialize conda by default for all users: RUN conda init --system -## Openscapes-specific configs +# Set up a primary conda environment distinct from (base) +ENV MY_ENV=${CONDA_ENV}/envs/openscapes +ENV PATH=${MY_ENV}/bin:${PATH} +RUN echo "PATH=${PATH}" >>"${R_HOME}/etc/Renviron.site" + +# Standard user setup here USER ${NB_USER} WORKDIR /home/${NB_USER} RUN usermod -s /bin/bash ${NB_USER} @@ -36,12 +40,6 @@ RUN usermod -s /bin/bash ${NB_USER} COPY install.R install.R RUN Rscript install.R && rm install.R -# consider installing jupyter-like stuff into base env instead? -# Create a conda-based env and install into it without using conda init/conda activate -# (this yaml file doesn't include everything from pangeo, consider a different one...) -ENV MY_ENV=${CONDA_ENV}/envs/openscapes COPY environment.yml environment.yml RUN conda env create -p ${MY_ENV} -f environment.yml -ENV PATH=${MY_ENV}/bin:${PATH} - From 5404f04ff692e0c2750d336c0fda2dd0c0fa2cda Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 22:29:41 -0800 Subject: [PATCH 28/59] explore conda init behavior --- .devcontainer/conda.Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index 4af531664..e4aa5ea9c 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -23,14 +23,14 @@ RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/downloa bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_ENV} && \ chown ${NB_USER}:staff -R ${CONDA_ENV} -# Initialize conda by default for all users: -RUN conda init --system - # Set up a primary conda environment distinct from (base) ENV MY_ENV=${CONDA_ENV}/envs/openscapes ENV PATH=${MY_ENV}/bin:${PATH} RUN echo "PATH=${PATH}" >>"${R_HOME}/etc/Renviron.site" +# Initialize conda by default for all users: +RUN conda init --system + # Standard user setup here USER ${NB_USER} WORKDIR /home/${NB_USER} From 7d022c192df39bb770688dbcfe269ababd96b2cc Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 23:07:22 -0800 Subject: [PATCH 29/59] :broom: --- .devcontainer/conda.Dockerfile | 5 ++++- .devcontainer/venv.Dockerfile | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index e4aa5ea9c..2218c4236 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -21,7 +21,8 @@ ENV CONDA_ENV=/opt/miniforge3 ENV PATH=${CONDA_ENV}/bin:${PATH} RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \ bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_ENV} && \ - chown ${NB_USER}:staff -R ${CONDA_ENV} + chown ${NB_USER}:staff -R ${CONDA_ENV} && \ + rm Miniforge3*.sh *.deb # Set up a primary conda environment distinct from (base) ENV MY_ENV=${CONDA_ENV}/envs/openscapes @@ -43,3 +44,5 @@ RUN Rscript install.R && rm install.R COPY environment.yml environment.yml RUN conda env create -p ${MY_ENV} -f environment.yml +RUN rm -rf .cache && conda clean --all + diff --git a/.devcontainer/venv.Dockerfile b/.devcontainer/venv.Dockerfile index a91a50b14..7bf6a108f 100644 --- a/.devcontainer/venv.Dockerfile +++ b/.devcontainer/venv.Dockerfile @@ -29,8 +29,7 @@ RUN usermod -s /bin/bash rstudio # install into the default environment COPY nasa-requirements.txt requirements.txt -RUN python -m pip install -r requirements.txt && rm requirements.txt +RUN python -m pip install --no-cache-dir -r requirements.txt && rm requirements.txt COPY install.R install.R RUN Rscript install.R && rm install.R - From 5121c63926bcb5b92fe306afaf535c2948870c2e Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 23:29:41 -0800 Subject: [PATCH 30/59] :broom: --- .devcontainer/Dockerfile | 4 ++-- .devcontainer/conda.Dockerfile | 8 +++----- .devcontainer/install.R | 2 +- .devcontainer/venv.Dockerfile | 7 ++++--- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e3b7df4f3..9efb06a4f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -29,7 +29,7 @@ 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 +RUN curl -fsSL https://code-server.dev/install.sh | sh && rm -rf .cache ## Openscapes-specific configs @@ -38,7 +38,7 @@ WORKDIR /home/rstudio RUN usermod -s /bin/bash rstudio # install into the default environment -COPY requirements.txt 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 diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index 2218c4236..4463c563e 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -2,11 +2,11 @@ FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 # latest version of geospatial libs -RUN /rocker_scripts/experimental/install_dev_osgeo.sh +RUN /rocker_scripts/experimental/install_dev_osgeo.sh && rm -rf /build_* RUN apt-get update -qq && apt-get -y install vim # podman doesn't not understand group permissions -RUN chown rstudio:staff -R ${R_HOME}/site-library +# RUN chown rstudio:staff -R ${R_HOME}/site-library # some teaching preferences RUN git config --system pull.rebase false && \ @@ -42,7 +42,5 @@ COPY install.R install.R RUN Rscript install.R && rm install.R COPY environment.yml environment.yml -RUN conda env create -p ${MY_ENV} -f environment.yml - -RUN rm -rf .cache && conda clean --all +RUN conda env create -p ${MY_ENV} -f environment.yml && conda clean --all diff --git a/.devcontainer/install.R b/.devcontainer/install.R index f4e85dc93..2c7a2835f 100755 --- a/.devcontainer/install.R +++ b/.devcontainer/install.R @@ -6,7 +6,7 @@ # Likewise, pak insists on installing old gdal from apt instead of respecting system library source builds # install.packages("pak") install.packages(c("rstac", "spData", "earthdatalogin", "quarto", "aws.s3", "tmap")) -remotes::install_github('r-tmap/tmap') +remotes::install_github('r-tmap/tmap', upgrade=FALSE) #pak::pkg_install("httpgd") #pak::pkg_install(c("IRkernel", "languageserver")) diff --git a/.devcontainer/venv.Dockerfile b/.devcontainer/venv.Dockerfile index 7bf6a108f..858f7111a 100644 --- a/.devcontainer/venv.Dockerfile +++ b/.devcontainer/venv.Dockerfile @@ -2,7 +2,7 @@ FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 ## latest version of geospatial libs -RUN /rocker_scripts/experimental/install_dev_osgeo.sh +RUN /rocker_scripts/experimental/install_dev_osgeo.sh && rm -rf build_* RUN apt-get update -qq && apt-get -y install vim # standard python/jupyter setup @@ -13,14 +13,15 @@ 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 +# RUN chown ${NB_USER}:staff -R ${R_HOME}/site-library +RUN chown ${NB_USER}:staff ${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 +RUN curl -fsSL https://code-server.dev/install.sh | sh && rm -rf .cache ## Openscapes-specific configs USER rstudio From f0a3cd1d05cb4db29b86d94a6719c5da6d316ab5 Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 3 Feb 2024 23:40:50 -0800 Subject: [PATCH 31/59] permissions --- .devcontainer/conda.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index 4463c563e..5847a74d2 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -5,8 +5,8 @@ FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 RUN /rocker_scripts/experimental/install_dev_osgeo.sh && rm -rf /build_* RUN apt-get update -qq && apt-get -y install vim -# podman doesn't not understand group permissions -# RUN chown rstudio:staff -R ${R_HOME}/site-library +# podman doesn't understand group permissions +RUN chown rstudio:staff ${R_HOME}/site-library # some teaching preferences RUN git config --system pull.rebase false && \ From 4b34a1313e49c9d08665ca2a7ef0017b591c17a5 Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Sat, 3 Feb 2024 23:48:19 -0800 Subject: [PATCH 32/59] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 43f3b554e..6dd5904c8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:venv", + "image": "docker.io/cboettig/nasa:venv", "runArgs": [ "--security-opt", "seccomp=unconfined" ], "name": "NASA OpenScapes Environment" } From 868f75ba67076a2b64fba0ec5070ee0c32070de2 Mon Sep 17 00:00:00 2001 From: Carl Date: Sun, 4 Feb 2024 00:01:33 -0800 Subject: [PATCH 33/59] single conda env --- .devcontainer/conda.Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index 5847a74d2..332413349 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -24,9 +24,6 @@ RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/downloa chown ${NB_USER}:staff -R ${CONDA_ENV} && \ rm Miniforge3*.sh *.deb -# Set up a primary conda environment distinct from (base) -ENV MY_ENV=${CONDA_ENV}/envs/openscapes -ENV PATH=${MY_ENV}/bin:${PATH} RUN echo "PATH=${PATH}" >>"${R_HOME}/etc/Renviron.site" # Initialize conda by default for all users: @@ -42,5 +39,5 @@ COPY install.R install.R RUN Rscript install.R && rm install.R COPY environment.yml environment.yml -RUN conda env create -p ${MY_ENV} -f environment.yml && conda clean --all +RUN conda env create -p ${CONDA_ENV} -f environment.yml && conda clean --all From e944da613240a1b2d0022b0f9df10df454714600 Mon Sep 17 00:00:00 2001 From: Carl Date: Sun, 4 Feb 2024 00:08:40 -0800 Subject: [PATCH 34/59] single conda env? --- .devcontainer/conda.Dockerfile | 2 +- .devcontainer/environment.yml | 1 + .devcontainer/install.R | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index 332413349..d436df1cd 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -39,5 +39,5 @@ COPY install.R install.R RUN Rscript install.R && rm install.R COPY environment.yml environment.yml -RUN conda env create -p ${CONDA_ENV} -f environment.yml && conda clean --all +RUN conda env update -f environment.yml && conda clean --all diff --git a/.devcontainer/environment.yml b/.devcontainer/environment.yml index e17a0a114..05e2e4dfc 100644 --- a/.devcontainer/environment.yml +++ b/.devcontainer/environment.yml @@ -32,6 +32,7 @@ dependencies: - icepyx - joblib - pystac-client + - odc-stac - pydap - lxml - ipyleaflet diff --git a/.devcontainer/install.R b/.devcontainer/install.R index 2c7a2835f..285c58dc2 100755 --- a/.devcontainer/install.R +++ b/.devcontainer/install.R @@ -5,7 +5,7 @@ # Does not provide a good way to ensure that sf/terra/gdalcubes are installed from source while other packages can be binary # Likewise, pak insists on installing old gdal from apt instead of respecting system library source builds # install.packages("pak") -install.packages(c("rstac", "spData", "earthdatalogin", "quarto", "aws.s3", "tmap")) +install.packages(c("rstac", "spData", "earthdatalogin", "quarto", "aws.s3", "tmap", "reticulate")) remotes::install_github('r-tmap/tmap', upgrade=FALSE) #pak::pkg_install("httpgd") From 6852bd0ec2099a5c906f9d4c525fe58740ec4f48 Mon Sep 17 00:00:00 2001 From: Carl Date: Sun, 4 Feb 2024 00:11:29 -0800 Subject: [PATCH 35/59] wip --- .devcontainer/conda2.Dockerfile | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .devcontainer/conda2.Dockerfile diff --git a/.devcontainer/conda2.Dockerfile b/.devcontainer/conda2.Dockerfile new file mode 100644 index 000000000..d65dbf788 --- /dev/null +++ b/.devcontainer/conda2.Dockerfile @@ -0,0 +1,46 @@ +# 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 && rm -rf /build_* +RUN apt-get update -qq && apt-get -y install vim + +# podman doesn't understand group permissions +RUN chown rstudio:staff ${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 + +# Set up conda +ENV NB_USER=rstudio +ENV CONDA_ENV=/opt/miniforge3 +ENV PATH=${CONDA_ENV}/bin:${PATH} +RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \ + bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_ENV} && \ + chown ${NB_USER}:staff -R ${CONDA_ENV} && \ + rm Miniforge3*.sh *.deb + +# Set up a primary conda environment distinct from (base) +ENV MY_ENV=${CONDA_ENV}/envs/openscapes +ENV PATH=${MY_ENV}/bin:${PATH} +RUN echo "PATH=${PATH}" >>"${R_HOME}/etc/Renviron.site" + +# Initialize conda by default for all users: +# RUN conda init --system # will cause terminal to start in base + +# Standard user setup here +USER ${NB_USER} +WORKDIR /home/${NB_USER} +RUN usermod -s /bin/bash ${NB_USER} + +# install into the default environment +COPY install.R install.R +RUN Rscript install.R && rm install.R + +COPY environment.yml environment.yml +RUN conda env create -p ${MY_ENV} -f environment.yml && conda clean --all + From 53c84e093b21563cd399ffe1d94253c9cbe12152 Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Sun, 4 Feb 2024 10:56:21 -0800 Subject: [PATCH 36/59] conda tag --- .github/workflows/docker-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3f9e161f1..59ae6e9b7 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -19,11 +19,11 @@ jobs: - name: Build the Docker image if: github.repository == 'eeholmes/earthdata-cloud-cookbook' run: | - docker build .devcontainer -f .devcontainer/conda.Dockerfile --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest + docker build .devcontainer -f .devcontainer/conda.Dockerfile --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:conda docker build .devcontainer -f .devcontainer/venv.Dockerfile --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:venv - name: Publish if: github.repository == 'eeholmes/earthdata-cloud-cookbook' run: | - docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:latest + docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:conda docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:venv From 9dc1cc309e6c9dad7c5bf9887041ca882d6aaa0a Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Sun, 4 Feb 2024 10:57:12 -0800 Subject: [PATCH 37/59] Update devcontainer.json use the venv container because it's smaller --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6dd5904c8..43f3b554e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "docker.io/cboettig/nasa:venv", + "image": "ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:venv", "runArgs": [ "--security-opt", "seccomp=unconfined" ], "name": "NASA OpenScapes Environment" } From 47b34d668389a1620a7d0fa216f4510cdc9bd816 Mon Sep 17 00:00:00 2001 From: Carl Date: Sun, 4 Feb 2024 11:19:05 -0800 Subject: [PATCH 38/59] vscode / codespaces stuff --- .devcontainer/devcontainer.json | 45 ++++++++++++++++++++++++++++++--- .devcontainer/setup.sh | 6 +++++ .devcontainer/welcome.sh | 16 ++++++++++++ 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100755 .devcontainer/setup.sh create mode 100755 .devcontainer/welcome.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6dd5904c8..c76206d67 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,44 @@ { - "image": "docker.io/cboettig/nasa:venv", + "image": "ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:venv", + // container run args for gdal netcdf vsi access "runArgs": [ "--security-opt", "seccomp=unconfined" ], - "name": "NASA OpenScapes Environment" -} + "name": "NASA TOPS Environment", + "waitFor": "onCreateCommand", + "features": { + "ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {} + }, + "customizations": { + "codespaces": { + "openFiles": ["README.md"] + }, + "vscode": { + "settings": { + "r.rterm.linux": "/usr/local/bin/radian", + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "[r]": { + "editor.wordSeparators": "`~!@#%$^&*()-=+[{]}\\|;:'\",<>/?" + } + }, + "extensions": [ + "reditorsupport.r", + "rdebugger.r-debugger", + "ms-toolsai.jupyter", + "ms-python.python" + ] + } + }, + // Forward the RStudio ports + "forwardPorts": [8787], + "portsAttributes": { + "8787": { + "label": "Rstudio", + "requireLocalPort": true, + "onAutoForward": "ignore" + } + }, + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "bash .devcontainer/setup.sh", + "postAttachCommand": "sudo rstudio-server start &> /dev/null && bash .devcontainer/welcome.sh", + "remoteUser": "rstudio" + } diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 000000000..b89dcf16d --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +sudo cp /etc/rstudio/disable_auth_rserver.conf /etc/rstudio/rserver.conf +sudo sudo bash -c 'echo "USER=rstudio" >>/etc/environment' +sudo /init &> /dev/null & + diff --git a/.devcontainer/welcome.sh b/.devcontainer/welcome.sh new file mode 100755 index 000000000..89aab9b8c --- /dev/null +++ b/.devcontainer/welcome.sh @@ -0,0 +1,16 @@ +mkdir -p ~/.local/share/rstudio/projects_settings +export RPROJ"=$(ls ${CODESPACE_VSCODE_FOLDER}/*.Rproj)" +echo ${RPROJ} > ~/.local/share/rstudio/projects_settings/last-project-path + + +# Construct the message +message="## [Open in RStudio](https://$CODESPACE_NAME-8787.app.github.dev) +" +# Echo the message to the terminal +echo " +👋 Welcome to Codespaces! You are on our custom image. + - It includes runtimes and tools for Python & R using Jupyter, Quarto, or RStudio + +🌐 Open the RStudio editor here: https://$CODESPACE_NAME-8787.app.github.dev + - (This may take a few seconds to load, retry if necessary) +" From 7db4f933becc89402da7ea5b544c9ec90cda0e1c Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Sun, 4 Feb 2024 11:38:08 -0800 Subject: [PATCH 39/59] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 59ae6e9b7..b5029936c 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,7 +2,7 @@ name: Docker Image CI on: workflow_dispatch: null push: - paths: ['.devcontainer/*'] + paths: ['.devcontainer/*.Dockerfile', '.devcontainer/*requirements.txt', '.devcontainer/environment.yml'] jobs: build: runs-on: ubuntu-latest From e2128e195d033b1d8e2c7a0540aeac2d23565673 Mon Sep 17 00:00:00 2001 From: Carl Date: Sun, 4 Feb 2024 12:16:04 -0800 Subject: [PATCH 40/59] wip --- .devcontainer/nasa-requirements.txt | 46 ++++++++++++++++++----------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/.devcontainer/nasa-requirements.txt b/.devcontainer/nasa-requirements.txt index c8dc3a7c5..0bbe7a5b6 100644 --- a/.devcontainer/nasa-requirements.txt +++ b/.devcontainer/nasa-requirements.txt @@ -1,31 +1,41 @@ jupyterhub jupyterlab notebook +jupyterlab-quarto 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 +jupyter-vscode-proxy +jupyter-console +jupyter-events +jupyter-lsp +jupyter_client +jupyter_core +jupyter_server +jupyter_server_terminals +jupyterlab-pygments +jupyterlab-widgets +jupyterlab_server +gh-scoped-creds +nbconvert +nbformat +odc-stac +planetary-computer polars pyarrow -pystac-client==0.7.5 -gh-scoped-creds +pystac-client scikit-image hvplot geoviews earthaccess pyresample contextily -pygeoweaver +rioxarray +geopandas +rasterstats +dask +distributed +h5netcdf +h5py +netCDF4 +zarr +lxml From f8e1640053d064534e5d1e0f41b62ffe487f209a Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 16:54:01 -0500 Subject: [PATCH 41/59] Update Dockerfile --- .devcontainer/Dockerfile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9efb06a4f..003559173 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -22,36 +22,40 @@ RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/downloa chown ${NB_USER}:staff -R ${CONDA_ENV} # podman doesn't not understand group permissions -RUN chown ${NB_USER}:staff -R ${R_HOME}/site-library +# RUN chown ${NB_USER}:staff -R ${R_HOME}/site-library -# some teaching preferences +# some teaching preferences; might replace with gh-creds RUN git config --system pull.rebase false && \ git config --system credential.helper 'cache --timeout=36000' -## codeserver +## codeserver; Add VSCode button RUN curl -fsSL https://code-server.dev/install.sh | sh && rm -rf .cache +## Install the R packages into site library +COPY install.R install.R +RUN Rscript install.R && rm install.R ## Openscapes-specific configs USER rstudio WORKDIR /home/rstudio +# make bash the user default RUN usermod -s /bin/bash rstudio -# install into the default environment +# install into the default venv environment 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 # Create a conda-based env and install into it without using conda init/conda activate # (this yaml file doesn't include everything from pangeo, consider a different one...) -ENV MY_ENV=${CONDA_ENV}/envs/openscapes +# pangeo uses the name 'notebook' +ENV ENV_NAME=notebook +ENV MY_ENV=${CONDA_ENV}/envs/${ENV_NAME} RUN wget https://github.com/NASA-Openscapes/corn/raw/main/ci/environment.yml && \ conda env create -p ${MY_ENV} -f environment.yml -# This won't be the default enviornment but we register it +# This won't be the default environment but we register it RUN ${MY_ENV}/bin/python -m pip install ipykernel && \ - ${MY_ENV}/bin/python -m ipykernel install --prefix /opt/venv --name=openscapes + ${MY_ENV}/bin/python -m ipykernel install --prefix /opt/venv --name=${ENV_NAME} From 1df1a41cdd7b222af0866176750ec9c7e825ef77 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 16:56:34 -0500 Subject: [PATCH 42/59] Update Dockerfile --- .devcontainer/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9efb06a4f..082628fb2 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,6 +3,9 @@ FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 ## latest version of geospatial libs RUN /rocker_scripts/experimental/install_dev_osgeo.sh + +## install vim for convenience +## texlive installed for install_jupyter.sh because it tries to install some basic tex libraries RUN apt-get update -qq && apt-get -y install vim texlive # standard python/jupyter setup From 4156d62f4dc7736214cd90dd5ba472e8da366e19 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 17:11:52 -0500 Subject: [PATCH 43/59] Update conda.Dockerfile --- .devcontainer/conda.Dockerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index d436df1cd..66ba9697d 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -3,17 +3,15 @@ FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 # latest version of geospatial libs RUN /rocker_scripts/experimental/install_dev_osgeo.sh && rm -rf /build_* +# install vim for convenience RUN apt-get update -qq && apt-get -y install vim -# podman doesn't understand group permissions -RUN chown rstudio:staff ${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 +# codeserver; Adds the VSCode button +RUN curl -fsSL https://code-server.dev/install.sh | sh && rm -rf .cache # Set up conda ENV NB_USER=rstudio @@ -22,22 +20,24 @@ ENV PATH=${CONDA_ENV}/bin:${PATH} RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \ bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_ENV} && \ chown ${NB_USER}:staff -R ${CONDA_ENV} && \ - rm Miniforge3*.sh *.deb + rm -f Miniforge3*.sh *.deb +# Tell RStudio how to find Python RUN echo "PATH=${PATH}" >>"${R_HOME}/etc/Renviron.site" +# install R packages into the site library +COPY install.R install.R +RUN Rscript install.R && rm install.R + # Initialize conda by default for all users: RUN conda init --system # Standard user setup here USER ${NB_USER} WORKDIR /home/${NB_USER} +# make bash default shell RUN usermod -s /bin/bash ${NB_USER} -# install into the default environment -COPY install.R install.R -RUN Rscript install.R && rm install.R - COPY environment.yml environment.yml RUN conda env update -f environment.yml && conda clean --all From 31ea9855e9c7d2eeaad9b6ce54721f938187adb5 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 17:28:50 -0500 Subject: [PATCH 44/59] Update welcome.sh --- .devcontainer/welcome.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.devcontainer/welcome.sh b/.devcontainer/welcome.sh index 89aab9b8c..e749423a1 100755 --- a/.devcontainer/welcome.sh +++ b/.devcontainer/welcome.sh @@ -1,8 +1,9 @@ +# Need to add this so that RStudio knows the project it is in mkdir -p ~/.local/share/rstudio/projects_settings + export RPROJ"=$(ls ${CODESPACE_VSCODE_FOLDER}/*.Rproj)" echo ${RPROJ} > ~/.local/share/rstudio/projects_settings/last-project-path - # Construct the message message="## [Open in RStudio](https://$CODESPACE_NAME-8787.app.github.dev) " @@ -13,4 +14,8 @@ echo " 🌐 Open the RStudio editor here: https://$CODESPACE_NAME-8787.app.github.dev - (This may take a few seconds to load, retry if necessary) + +🌐 Open the JupyterLab editor here: https://$CODESPACE_NAME.app.github.dev?editor=jupyter + - (This may take a few seconds to load, retry if necessary) + " From 92b35e9b899b394813940ff66ab102dbdc522d37 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 17:30:04 -0500 Subject: [PATCH 45/59] Update venv.Dockerfile --- .devcontainer/venv.Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devcontainer/venv.Dockerfile b/.devcontainer/venv.Dockerfile index 858f7111a..5440644e8 100644 --- a/.devcontainer/venv.Dockerfile +++ b/.devcontainer/venv.Dockerfile @@ -1,6 +1,9 @@ ## devcontainer-focused Rocker FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 +## Set the default shell +ENV SHELL=/bin/bash + ## latest version of geospatial libs RUN /rocker_scripts/experimental/install_dev_osgeo.sh && rm -rf build_* RUN apt-get update -qq && apt-get -y install vim From 1e0dc8bc6ca8ce7ce53332f8aad40f66b96a805c Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 17:30:40 -0500 Subject: [PATCH 46/59] Update conda.Dockerfile --- .devcontainer/conda.Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index d436df1cd..528a96f10 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -1,6 +1,9 @@ # devcontainer-focused Rocker FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 +## Set the default shell +ENV SHELL=/bin/bash + # latest version of geospatial libs RUN /rocker_scripts/experimental/install_dev_osgeo.sh && rm -rf /build_* RUN apt-get update -qq && apt-get -y install vim From 920b6f0e9ecb157470a242ce6d427778379abed5 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 17:35:44 -0500 Subject: [PATCH 47/59] Update venv.Dockerfile --- .devcontainer/venv.Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.devcontainer/venv.Dockerfile b/.devcontainer/venv.Dockerfile index 5440644e8..a16dd2171 100644 --- a/.devcontainer/venv.Dockerfile +++ b/.devcontainer/venv.Dockerfile @@ -6,6 +6,8 @@ ENV SHELL=/bin/bash ## latest version of geospatial libs RUN /rocker_scripts/experimental/install_dev_osgeo.sh && rm -rf build_* + +## install vim RUN apt-get update -qq && apt-get -y install vim # standard python/jupyter setup @@ -15,10 +17,6 @@ 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 -RUN chown ${NB_USER}:staff ${R_HOME}/site-library - # some teaching preferences RUN git config --system pull.rebase false && \ git config --system credential.helper 'cache --timeout=36000' @@ -26,14 +24,16 @@ RUN git config --system pull.rebase false && \ ## codeserver RUN curl -fsSL https://code-server.dev/install.sh | sh && rm -rf .cache +## Install R packages into the site library +COPY install.R install.R +RUN Rscript install.R && rm install.R + ## Openscapes-specific configs USER rstudio WORKDIR /home/rstudio RUN usermod -s /bin/bash rstudio -# install into the default environment +# install into the default venv environment COPY nasa-requirements.txt requirements.txt RUN python -m pip install --no-cache-dir -r requirements.txt && rm requirements.txt -COPY install.R install.R -RUN Rscript install.R && rm install.R From f84a70b217729b3c2766a347f4162ff06c6867fb Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 17:41:23 -0500 Subject: [PATCH 48/59] Update venv.Dockerfile --- .devcontainer/venv.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/venv.Dockerfile b/.devcontainer/venv.Dockerfile index a16dd2171..9ec7310e7 100644 --- a/.devcontainer/venv.Dockerfile +++ b/.devcontainer/venv.Dockerfile @@ -11,6 +11,7 @@ RUN /rocker_scripts/experimental/install_dev_osgeo.sh && rm -rf build_* RUN apt-get update -qq && apt-get -y install vim # standard python/jupyter setup +# install python that is with the ubuntu install ENV NB_USER=rstudio ENV VIRTUAL_ENV=/opt/venv ENV PATH=${VIRTUAL_ENV}/bin:${PATH} From d4a4618ee891e97e441e6905076eab2a3a384ce3 Mon Sep 17 00:00:00 2001 From: Carl Boettiger Date: Fri, 16 Feb 2024 15:29:43 -0800 Subject: [PATCH 49/59] Update docker-image.yml --- .github/workflows/docker-image.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index b5029936c..112ef4ae2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -3,6 +3,7 @@ on: workflow_dispatch: null push: paths: ['.devcontainer/*.Dockerfile', '.devcontainer/*requirements.txt', '.devcontainer/environment.yml'] + branches: main jobs: build: runs-on: ubuntu-latest From b57deacb22350f57c32b0147f26ade16aa100413 Mon Sep 17 00:00:00 2001 From: Carl Date: Fri, 16 Feb 2024 16:11:07 -0800 Subject: [PATCH 50/59] fix conda PATH --- .devcontainer/conda.Dockerfile | 17 ++++++++++++++--- .devcontainer/install.R | 6 +++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index 17c2ff553..94c4b5c84 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -4,9 +4,10 @@ FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 ## Set the default shell ENV SHELL=/bin/bash -# latest version of geospatial libs -RUN /rocker_scripts/experimental/install_dev_osgeo.sh && rm -rf /build_* +# latest version of geospatial libs -- big! +# RUN /rocker_scripts/experimental/install_dev_osgeo.sh && rm -rf /build_* # install vim for convenience + RUN apt-get update -qq && apt-get -y install vim # some teaching preferences @@ -16,8 +17,14 @@ RUN git config --system pull.rebase false && \ # codeserver; Adds the VSCode button RUN curl -fsSL https://code-server.dev/install.sh | sh && rm -rf .cache +# Rename the rstudio user as jovyan +RUN usermod -l jovyan rstudio && \ + usermod -d /home/jovyan -m jovyan && \ + groupmod -n jovyan rstudio + + # Set up conda -ENV NB_USER=rstudio +ENV NB_USER=jovyan ENV CONDA_ENV=/opt/miniforge3 ENV PATH=${CONDA_ENV}/bin:${PATH} RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \ @@ -41,6 +48,10 @@ WORKDIR /home/${NB_USER} # make bash default shell RUN usermod -s /bin/bash ${NB_USER} + +ENV NOTEBOOK_ENV=${CONDA_ENV}/envs/openscapes +ENV PATH=${NOTEBOOK_ENV}/bin:${PATH} + COPY environment.yml environment.yml RUN conda env update -f environment.yml && conda clean --all diff --git a/.devcontainer/install.R b/.devcontainer/install.R index 285c58dc2..5bf6b8c13 100755 --- a/.devcontainer/install.R +++ b/.devcontainer/install.R @@ -4,9 +4,9 @@ # 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 # Likewise, pak insists on installing old gdal from apt instead of respecting system library source builds -# install.packages("pak") -install.packages(c("rstac", "spData", "earthdatalogin", "quarto", "aws.s3", "tmap", "reticulate")) -remotes::install_github('r-tmap/tmap', upgrade=FALSE) +install.packages("pak") +pak::pkg_install(c("rstac", "spData", "earthdatalogin", "quarto", "aws.s3", "tmap", "reticulate")) +pak::pkg_install('r-tmap/tmap') #pak::pkg_install("httpgd") #pak::pkg_install(c("IRkernel", "languageserver")) From a795f505d1d99b42556eaa319734944f416b96b3 Mon Sep 17 00:00:00 2001 From: Carl Date: Fri, 16 Feb 2024 16:46:43 -0800 Subject: [PATCH 51/59] set path for rstudio too --- .devcontainer/conda.Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index 94c4b5c84..f9614d457 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -32,6 +32,9 @@ RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/downloa chown ${NB_USER}:staff -R ${CONDA_ENV} && \ rm -f Miniforge3*.sh *.deb +ENV NOTEBOOK_ENV=${CONDA_ENV}/envs/openscapes +ENV PATH=${NOTEBOOK_ENV}/bin:${PATH} + # Tell RStudio how to find Python RUN echo "PATH=${PATH}" >>"${R_HOME}/etc/Renviron.site" @@ -39,7 +42,6 @@ RUN echo "PATH=${PATH}" >>"${R_HOME}/etc/Renviron.site" COPY install.R install.R RUN Rscript install.R && rm install.R -# Initialize conda by default for all users: RUN conda init --system # Standard user setup here @@ -48,10 +50,6 @@ WORKDIR /home/${NB_USER} # make bash default shell RUN usermod -s /bin/bash ${NB_USER} - -ENV NOTEBOOK_ENV=${CONDA_ENV}/envs/openscapes -ENV PATH=${NOTEBOOK_ENV}/bin:${PATH} - COPY environment.yml environment.yml RUN conda env update -f environment.yml && conda clean --all From 7ebd2c93f32de4f9e72a1049bdc14bd87db668cf Mon Sep 17 00:00:00 2001 From: Carl Date: Fri, 16 Feb 2024 16:59:58 -0800 Subject: [PATCH 52/59] follow pangeo for conda decorators --- .devcontainer/conda.Dockerfile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index f9614d457..7a6a5b466 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -25,15 +25,20 @@ RUN usermod -l jovyan rstudio && \ # Set up conda ENV NB_USER=jovyan -ENV CONDA_ENV=/opt/miniforge3 -ENV PATH=${CONDA_ENV}/bin:${PATH} +ENV CONDA_DIR=/opt/miniforge3 +ENV CONDA_ENV=openscapes +ENV NB_PYTHON_PREFIX=${CONDA_DIR}/envs/${CONDA_ENV} +ENV PATH=${NB_PYTHON_PREFIX}/bin:/${CONDA_DIR}/bin:${PATH} + +# install conda RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \ - bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_ENV} && \ - chown ${NB_USER}:staff -R ${CONDA_ENV} && \ + bash Miniforge3-$(uname)-$(uname -m).sh -b -p ${CONDA_DIR} && \ + chown ${NB_USER}:staff -R ${CONDA_DIR} && \ rm -f Miniforge3*.sh *.deb -ENV NOTEBOOK_ENV=${CONDA_ENV}/envs/openscapes -ENV PATH=${NOTEBOOK_ENV}/bin:${PATH} +# conda decorators +RUN conda init --system +RUN echo ". ${CONDA_DIR}/etc/profile.d/conda.sh ; conda activate ${CONDA_ENV}" > /etc/profile.d/init_conda.sh # Tell RStudio how to find Python RUN echo "PATH=${PATH}" >>"${R_HOME}/etc/Renviron.site" @@ -42,8 +47,6 @@ RUN echo "PATH=${PATH}" >>"${R_HOME}/etc/Renviron.site" COPY install.R install.R RUN Rscript install.R && rm install.R -RUN conda init --system - # Standard user setup here USER ${NB_USER} WORKDIR /home/${NB_USER} From 79d84b79656afdb447c8cf2a361ea5f0f10db660 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 22:43:20 -0500 Subject: [PATCH 53/59] Create docker-build-conda.yml --- .github/workflows/docker-build-conda.yml | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/docker-build-conda.yml diff --git a/.github/workflows/docker-build-conda.yml b/.github/workflows/docker-build-conda.yml new file mode 100644 index 000000000..d2835361b --- /dev/null +++ b/.github/workflows/docker-build-conda.yml @@ -0,0 +1,30 @@ +name: Docker Image CI conda +on: + workflow_dispatch: null + push: + paths: + - '.devcontainer/conda.Dockerfile' + - '.devcontainer/environment.yml' + - '.github/workflows/docker-build-conda.yml' + branches: main +jobs: + build: + runs-on: ubuntu-latest + permissions: write-all + steps: + - uses: actions/checkout@v3 + - name: Login to GitHub Container Registry + if: github.repository == 'eeholmes/earthdata-cloud-cookbook' + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + - name: Build the Docker image + if: github.repository == 'eeholmes/earthdata-cloud-cookbook' + run: | + docker build .devcontainer -f .devcontainer/conda.Dockerfile --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook-conda:latest + - name: Publish + if: github.repository == 'eeholmes/earthdata-cloud-cookbook' + run: | + docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook-conda:latest From f3bdb058cdc91b9dd2cbd70d3c25170dd40bf1e1 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 22:43:40 -0500 Subject: [PATCH 54/59] Rename docker-build-conda.yml to docker-image-conda.yml --- .../workflows/{docker-build-conda.yml => docker-image-conda.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{docker-build-conda.yml => docker-image-conda.yml} (100%) diff --git a/.github/workflows/docker-build-conda.yml b/.github/workflows/docker-image-conda.yml similarity index 100% rename from .github/workflows/docker-build-conda.yml rename to .github/workflows/docker-image-conda.yml From 36d16b5b48c007ead7d1e89abee8eef7b4559b97 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 22:44:13 -0500 Subject: [PATCH 55/59] Rename docker-image.yml to docker-image-venv.yml --- .github/workflows/{docker-image.yml => docker-image-venv.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{docker-image.yml => docker-image-venv.yml} (100%) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image-venv.yml similarity index 100% rename from .github/workflows/docker-image.yml rename to .github/workflows/docker-image-venv.yml From e85e6c1b5ec668a535f6cb8983a7f37dfd989297 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 16 Feb 2024 22:46:52 -0500 Subject: [PATCH 56/59] Update docker-image-venv.yml --- .github/workflows/docker-image-venv.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-image-venv.yml b/.github/workflows/docker-image-venv.yml index 112ef4ae2..9fa4ceb2a 100644 --- a/.github/workflows/docker-image-venv.yml +++ b/.github/workflows/docker-image-venv.yml @@ -1,8 +1,11 @@ -name: Docker Image CI +name: Docker Image CI venv on: workflow_dispatch: null push: - paths: ['.devcontainer/*.Dockerfile', '.devcontainer/*requirements.txt', '.devcontainer/environment.yml'] + paths: + - '.devcontainer/venv.Dockerfile' + - '.devcontainer/nasa-requirements.txt' + - '.github/workflows/docker-image-venv.yml' branches: main jobs: build: @@ -20,11 +23,9 @@ jobs: - name: Build the Docker image if: github.repository == 'eeholmes/earthdata-cloud-cookbook' run: | - docker build .devcontainer -f .devcontainer/conda.Dockerfile --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:conda - docker build .devcontainer -f .devcontainer/venv.Dockerfile --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:venv + docker build .devcontainer -f .devcontainer/venv.Dockerfile --tag ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook-venv:latest - name: Publish if: github.repository == 'eeholmes/earthdata-cloud-cookbook' run: | - docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:conda - docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook:venv + docker push ghcr.io/eeholmes/earthdata-cloud-cookbook/cookbook-venv:latest From 324a8ad1a8cb55eb7b06ea743e9b7c0a5d8b5cd2 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Thu, 14 Mar 2024 11:33:31 -0700 Subject: [PATCH 57/59] Update conda.Dockerfile --- .devcontainer/conda.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/conda.Dockerfile b/.devcontainer/conda.Dockerfile index 7a6a5b466..9e03c16cb 100644 --- a/.devcontainer/conda.Dockerfile +++ b/.devcontainer/conda.Dockerfile @@ -55,4 +55,5 @@ RUN usermod -s /bin/bash ${NB_USER} COPY environment.yml environment.yml RUN conda env update -f environment.yml && conda clean --all +RUN rm environment.yml From 3baf4332cd0970ebc46e3fa4f589820fb1f727da Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Thu, 14 Mar 2024 11:34:41 -0700 Subject: [PATCH 58/59] Update conda2.Dockerfile --- .devcontainer/conda2.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/conda2.Dockerfile b/.devcontainer/conda2.Dockerfile index d65dbf788..d4306bfe1 100644 --- a/.devcontainer/conda2.Dockerfile +++ b/.devcontainer/conda2.Dockerfile @@ -40,6 +40,7 @@ RUN usermod -s /bin/bash ${NB_USER} # install into the default environment COPY install.R install.R RUN Rscript install.R && rm install.R +RUN rm install.R COPY environment.yml environment.yml RUN conda env create -p ${MY_ENV} -f environment.yml && conda clean --all From 5dff0e4bd48184937ad9a40c8826a4d8e606444e Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Thu, 14 Mar 2024 11:35:44 -0700 Subject: [PATCH 59/59] Update venv.Dockerfile --- .devcontainer/venv.Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.devcontainer/venv.Dockerfile b/.devcontainer/venv.Dockerfile index 9ec7310e7..85f6ac30a 100644 --- a/.devcontainer/venv.Dockerfile +++ b/.devcontainer/venv.Dockerfile @@ -28,6 +28,7 @@ RUN curl -fsSL https://code-server.dev/install.sh | sh && rm -rf .cache ## Install R packages into the site library COPY install.R install.R RUN Rscript install.R && rm install.R +RUN rm install.R ## Openscapes-specific configs USER rstudio @@ -37,4 +38,5 @@ RUN usermod -s /bin/bash rstudio # install into the default venv environment COPY nasa-requirements.txt requirements.txt RUN python -m pip install --no-cache-dir -r requirements.txt && rm requirements.txt +RUN rm requirements.txt