From 83c583ac32a323b8a3de4cb26d7b05f04033cb6d Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Mon, 10 Apr 2023 12:09:14 -0600 Subject: [PATCH 01/77] Updating to Python 3.11 --- environment.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index 32402e0..9ba9af7 100644 --- a/environment.yml +++ b/environment.yml @@ -4,8 +4,9 @@ channels: - defaults dependencies: - - python=3.8 + - python=3.11 - pip + # Core scientific python - numpy - pyqt @@ -34,6 +35,7 @@ dependencies: - tweepy - xarray - rioxarray>=0.3.0 + - xarray-spatial - scipy - netcdf4 - nc-time-axis @@ -45,7 +47,6 @@ dependencies: # Jupyter Environment - papermill - - autopep8 - jupyterlab - notebook - ipython @@ -53,6 +54,12 @@ dependencies: - nbclean - nbresuse + # QA + - flake8 + - black + - autopep8 + - pydocstyle + - nbqa + # Autograding - - matplotcheck>=0.1.3 - nbgrader From f569c7367a9186155bb5ada110f229093882df4d Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Tue, 11 Apr 2023 14:05:37 -0600 Subject: [PATCH 02/77] Update build-test-envt.yml to run only manually --- .github/workflows/build-test-envt.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build-test-envt.yml b/.github/workflows/build-test-envt.yml index 961ac5c..975c15e 100644 --- a/.github/workflows/build-test-envt.yml +++ b/.github/workflows/build-test-envt.yml @@ -4,13 +4,7 @@ name: Test EA Python Envt Mac, Linux, Windows -on: - push: - branches: - - '*' - pull_request: - branches: - - '*' +on: workflow_dispatch jobs: runtests: From de0f41951b3af7b4a270d9572de59842bd422b8e Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Tue, 11 Apr 2023 14:06:12 -0600 Subject: [PATCH 03/77] Update build-push-image.yml to run only manually --- .github/workflows/build-push-image.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index af3f644..1648b91 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -2,9 +2,7 @@ # main branch only name: Push to Docker Hub from Main Branch -on: - push: - branches: main +on: workflow_dispatch jobs: build-push-image: From cb510c00761acad7de2f35a26a8d223e3315be66 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Tue, 11 Apr 2023 14:08:09 -0600 Subject: [PATCH 04/77] Delete build-image.yml --- .github/workflows/build-image.yml | 33 ------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .github/workflows/build-image.yml diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml deleted file mode 100644 index f414b9b..0000000 --- a/.github/workflows/build-image.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This build will only build the image on any branch (besides main) where there is a push -name: Build Docker Image - -on: - push: - branches: - - '*' - - '!main' - -jobs: - build-image: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Build Image - id: docker_build - uses: docker/build-push-action@v2 - with: - context: ./ - file: ./Dockerfile - push: false - tags: earthlab/r-python-eds-lessons-env:latest - - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} From b43ebd3d5f4470928abd53cb3b455a409eea8bf3 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Tue, 11 Apr 2023 14:10:31 -0600 Subject: [PATCH 05/77] Create build-for-docker.yml --- .github/workflows/build-for-docker.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build-for-docker.yml diff --git a/.github/workflows/build-for-docker.yml b/.github/workflows/build-for-docker.yml new file mode 100644 index 0000000..2b8cebb --- /dev/null +++ b/.github/workflows/build-for-docker.yml @@ -0,0 +1,25 @@ +name: Test environment for Docker + +on: workflow_dispatch + +jobs: + runtests: + name: "Set up environment" + runs-on: "ubuntu-latest" + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@v2 + - uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: 'latest' + channels: conda-forge + channel-priority: true + auto-update-conda: false + auto-activate-base: false + environment-file: environment.yml + activate-environment: earth-analytics-python + - run: conda list + - run: python -c "import earthpy" + - run: python -c "import rasterio" From 73e9c7464cdd8e929269427cc6a4d1d6f52526ee Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Tue, 11 Apr 2023 14:27:26 -0600 Subject: [PATCH 06/77] New token for dockerhub --- .github/workflows/build-push-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index 1648b91..3dd09fb 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -24,7 +24,7 @@ jobs: context: ./ file: ./Dockerfile push: true - tags: earthlab/r-python-eds-lessons-env:latest + tags: earthlab/earth-analytics-python-env:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From de22a9127ef6d5e51ab9700c08b4a7f8f530a04b Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 12 Apr 2023 14:13:49 -0600 Subject: [PATCH 07/77] Adding ML libraries, back to 3.10 --- environment.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 9ba9af7..09a35f6 100644 --- a/environment.yml +++ b/environment.yml @@ -2,9 +2,10 @@ name: earth-analytics-python channels: - conda-forge - defaults + - pytorch dependencies: - - python=3.11 + - python=3.10 - pip # Core scientific python @@ -13,6 +14,11 @@ dependencies: - tqdm - kiwisolver + # ML + - scikit-learn + - pytorch + - torchvision + # Plotting - matplotlib - plotly From 46adcd0fa9f0f0178b075f12ef8dec150c4c612f Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 12 Apr 2023 14:18:27 -0600 Subject: [PATCH 08/77] Dockerfile improvements from Tyson --- Dockerfile | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index ffe8187..5c18063 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,29 @@ -FROM jupyter/minimal-notebook +FROM harbor.cyverse.org/vice/jupyter/datascience:latest -MAINTAINER Leah Wasser +USER jovyan -COPY environment.yml environment.yml +RUN conda update conda +RUN conda config --remove channels conda-forge +RUN conda config --add channels conda-forge +RUN conda config --set channel_priority strict -RUN conda env update --name base --file environment.yml \ - && conda info --envs \ - && conda list \ - && rm environment.yml +COPY environment.yml /home/jovyan/ +RUN mamba env create -f /home/jovyan/environment.yml +# using ~/.bash_profile instead of ~/.bashrc for non-interactive tty (-it) containers +RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \ + echo "conda deactivate" >> /home/jovyan/.bash_profile && \ + echo "conda activate earth-analytics-python" >> /home/jovyan/.bash_profile +RUN . /opt/conda/etc/profile.d/conda.sh && conda activate Earthlab && python -m ipykernel install --user --name earth-analytics-python +RUN source /home/jovyan/.bash_profile -ENV PROJ_LIB $CONDA_DIR/share/proj +# Install JupyterLab widget extensions +RUN sudo chown -R 1000:100 /opt/conda/share +RUN jupyter labextension install \ + ipyvolume \ + itkwidgets \ + jupyterlab_iframe \ + jupyter-leaflet \ + jupyter-threejs \ + && npm cache clean --force -# Test imports -RUN python -c "import rasterio" -RUN python -c "import earthpy" +RUN jupyter lab build From f05fb83b27b9df531f97d515a69b1f8296771c9b Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 12 Apr 2023 14:21:07 -0600 Subject: [PATCH 09/77] Update build-push-image.yml --- .github/workflows/build-push-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index 1648b91..3dd09fb 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -24,7 +24,7 @@ jobs: context: ./ file: ./Dockerfile push: true - tags: earthlab/r-python-eds-lessons-env:latest + tags: earthlab/earth-analytics-python-env:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From 36314b763f4aae71fe88253e38b59a301a3f7409 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 12 Apr 2023 16:04:25 -0600 Subject: [PATCH 10/77] replacing environment name --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5c18063..a4b1b87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN mamba env create -f /home/jovyan/environment.yml RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \ echo "conda deactivate" >> /home/jovyan/.bash_profile && \ echo "conda activate earth-analytics-python" >> /home/jovyan/.bash_profile -RUN . /opt/conda/etc/profile.d/conda.sh && conda activate Earthlab && python -m ipykernel install --user --name earth-analytics-python +RUN . /opt/conda/etc/profile.d/conda.sh && conda activate earth-analytics-python && python -m ipykernel install --user --name earth-analytics-python RUN source /home/jovyan/.bash_profile # Install JupyterLab widget extensions From a335ce18fa41caa23c62857b71864985ed12a0b8 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Thu, 13 Apr 2023 12:41:33 -0600 Subject: [PATCH 11/77] Roll back base image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a4b1b87..5a17d60 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM harbor.cyverse.org/vice/jupyter/datascience:latest +FROM jupyter/minimal-notebook USER jovyan From 196e418b06c3b8f45d3927d677d6c83c0fcaa560 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Thu, 13 Apr 2023 12:57:00 -0600 Subject: [PATCH 12/77] Removing breaking permissions link --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5a17d60..a9275a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,6 @@ RUN . /opt/conda/etc/profile.d/conda.sh && conda activate earth-analytics-python RUN source /home/jovyan/.bash_profile # Install JupyterLab widget extensions -RUN sudo chown -R 1000:100 /opt/conda/share RUN jupyter labextension install \ ipyvolume \ itkwidgets \ From f99c6772081ce604e3241c7168e2a3159a5f4f27 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Thu, 13 Apr 2023 12:57:26 -0600 Subject: [PATCH 13/77] Update build-push-image.yml --- .github/workflows/build-push-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index 3dd09fb..5b98344 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -1,6 +1,6 @@ # This build will build and push the image to docker hub upon a commit to the # main branch only -name: Push to Docker Hub from Main Branch +name: Push to Docker Hub on: workflow_dispatch From 46ca895f97d0b4f0ae6a291b789a31108722d2aa Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Thu, 13 Apr 2023 12:59:48 -0600 Subject: [PATCH 14/77] tag with branch --- .github/workflows/build-push-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index 5b98344..b20f425 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -24,7 +24,7 @@ jobs: context: ./ file: ./Dockerfile push: true - tags: earthlab/earth-analytics-python-env:latest + tags: earthlab/earth-analytics-python-env:${GITHUB_REF##*/} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From e03267fb9cac2cee87420e7a20cd36a2934ee074 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Thu, 13 Apr 2023 13:31:45 -0600 Subject: [PATCH 15/77] miniconda base image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a9275a4..5b70249 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM jupyter/minimal-notebook +FROM continuumio/miniconda3 USER jovyan From fc589719848ee6ea59989a8b65db29ad3ff1db8c Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Thu, 13 Apr 2023 13:32:37 -0600 Subject: [PATCH 16/77] Comment out new libraries --- environment.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index 09a35f6..ae2f90f 100644 --- a/environment.yml +++ b/environment.yml @@ -16,8 +16,8 @@ dependencies: # ML - scikit-learn - - pytorch - - torchvision + # - pytorch + # - torchvision # Plotting - matplotlib @@ -41,7 +41,8 @@ dependencies: - tweepy - xarray - rioxarray>=0.3.0 - - xarray-spatial + # - xarray-spatial + # - h5py - scipy - netcdf4 - nc-time-axis From 9e71ef1cba1cfa6789f9bc4ed51761688aa8096c Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Thu, 13 Apr 2023 13:35:22 -0600 Subject: [PATCH 17/77] Adding jovyan user --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 5b70249..aa3e98e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM continuumio/miniconda3 +RUN useradd -ms /bin/bash jovyan USER jovyan RUN conda update conda From 47073cb49efd8a2e7229cb467c7e46e331d084af Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Thu, 13 Apr 2023 13:41:02 -0600 Subject: [PATCH 18/77] Switch back to jupyter base image --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa3e98e..a9275a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ -FROM continuumio/miniconda3 +FROM jupyter/minimal-notebook -RUN useradd -ms /bin/bash jovyan USER jovyan RUN conda update conda From 10c464d9b173729b67c30d173642be72170c657f Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 19 Apr 2023 10:47:06 -0600 Subject: [PATCH 19/77] Add nbgrader install --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index a9275a4..e1079a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,7 @@ RUN jupyter labextension install \ jupyterlab_iframe \ jupyter-leaflet \ jupyter-threejs \ + nbgrader \ && npm cache clean --force RUN jupyter lab build From c9a360b724673c26de795fd5fe6eee3f46592c59 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 19 Apr 2023 11:35:08 -0600 Subject: [PATCH 20/77] remove nbgrader --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e1079a2..a9275a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,6 @@ RUN jupyter labextension install \ jupyterlab_iframe \ jupyter-leaflet \ jupyter-threejs \ - nbgrader \ && npm cache clean --force RUN jupyter lab build From 3e150c699587a6b52e18c85f34bdedf7dce5aad9 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 19 Apr 2023 12:20:47 -0600 Subject: [PATCH 21/77] install as base environment on docker --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a9275a4..d4900a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,12 +8,12 @@ RUN conda config --add channels conda-forge RUN conda config --set channel_priority strict COPY environment.yml /home/jovyan/ -RUN mamba env create -f /home/jovyan/environment.yml +RUN mamba env create -n base -f /home/jovyan/environment.yml # using ~/.bash_profile instead of ~/.bashrc for non-interactive tty (-it) containers RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \ echo "conda deactivate" >> /home/jovyan/.bash_profile && \ - echo "conda activate earth-analytics-python" >> /home/jovyan/.bash_profile -RUN . /opt/conda/etc/profile.d/conda.sh && conda activate earth-analytics-python && python -m ipykernel install --user --name earth-analytics-python + echo "conda activate base" >> /home/jovyan/.bash_profile +RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && python -m ipykernel install --user --name base RUN source /home/jovyan/.bash_profile # Install JupyterLab widget extensions @@ -23,6 +23,7 @@ RUN jupyter labextension install \ jupyterlab_iframe \ jupyter-leaflet \ jupyter-threejs \ + nbgrader \ && npm cache clean --force RUN jupyter lab build From 3364d7432e840b73d8af53b2b2e670952a69e8f1 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 19 Apr 2023 12:42:16 -0600 Subject: [PATCH 22/77] update not create base environment --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d4900a9..78115c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN conda config --add channels conda-forge RUN conda config --set channel_priority strict COPY environment.yml /home/jovyan/ -RUN mamba env create -n base -f /home/jovyan/environment.yml +RUN mamba env update -n base -f /home/jovyan/environment.yml # using ~/.bash_profile instead of ~/.bashrc for non-interactive tty (-it) containers RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \ echo "conda deactivate" >> /home/jovyan/.bash_profile && \ From e676ec754610b2ab351a9b745c1337f3e6d3fab8 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 19 Apr 2023 14:18:24 -0600 Subject: [PATCH 23/77] revert --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78115c6..a9275a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,12 +8,12 @@ RUN conda config --add channels conda-forge RUN conda config --set channel_priority strict COPY environment.yml /home/jovyan/ -RUN mamba env update -n base -f /home/jovyan/environment.yml +RUN mamba env create -f /home/jovyan/environment.yml # using ~/.bash_profile instead of ~/.bashrc for non-interactive tty (-it) containers RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \ echo "conda deactivate" >> /home/jovyan/.bash_profile && \ - echo "conda activate base" >> /home/jovyan/.bash_profile -RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && python -m ipykernel install --user --name base + echo "conda activate earth-analytics-python" >> /home/jovyan/.bash_profile +RUN . /opt/conda/etc/profile.d/conda.sh && conda activate earth-analytics-python && python -m ipykernel install --user --name earth-analytics-python RUN source /home/jovyan/.bash_profile # Install JupyterLab widget extensions @@ -23,7 +23,6 @@ RUN jupyter labextension install \ jupyterlab_iframe \ jupyter-leaflet \ jupyter-threejs \ - nbgrader \ && npm cache clean --force RUN jupyter lab build From e7d761aebd6d30b368727565a9455daaf332d0b3 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 19 Apr 2023 15:15:38 -0600 Subject: [PATCH 24/77] Redo changes --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a9275a4..78115c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,12 +8,12 @@ RUN conda config --add channels conda-forge RUN conda config --set channel_priority strict COPY environment.yml /home/jovyan/ -RUN mamba env create -f /home/jovyan/environment.yml +RUN mamba env update -n base -f /home/jovyan/environment.yml # using ~/.bash_profile instead of ~/.bashrc for non-interactive tty (-it) containers RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \ echo "conda deactivate" >> /home/jovyan/.bash_profile && \ - echo "conda activate earth-analytics-python" >> /home/jovyan/.bash_profile -RUN . /opt/conda/etc/profile.d/conda.sh && conda activate earth-analytics-python && python -m ipykernel install --user --name earth-analytics-python + echo "conda activate base" >> /home/jovyan/.bash_profile +RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && python -m ipykernel install --user --name base RUN source /home/jovyan/.bash_profile # Install JupyterLab widget extensions @@ -23,6 +23,7 @@ RUN jupyter labextension install \ jupyterlab_iframe \ jupyter-leaflet \ jupyter-threejs \ + nbgrader \ && npm cache clean --force RUN jupyter lab build From cbc9146d61a8221f990b69c38157fc73df268bc9 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Mon, 24 Apr 2023 17:52:07 -0600 Subject: [PATCH 25/77] add h5py --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index ae2f90f..3dbc081 100644 --- a/environment.yml +++ b/environment.yml @@ -42,7 +42,7 @@ dependencies: - xarray - rioxarray>=0.3.0 # - xarray-spatial - # - h5py + - h5py - scipy - netcdf4 - nc-time-axis From 77e7303af83dcc6452d7639e8745f7d983063d73 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Sun, 30 Apr 2023 13:35:50 -0600 Subject: [PATCH 26/77] Added flake8-import-order --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 3dbc081..fadf2d0 100644 --- a/environment.yml +++ b/environment.yml @@ -63,6 +63,7 @@ dependencies: # QA - flake8 + - flake8-import-order - black - autopep8 - pydocstyle From 7e8372750b05c22872ef24b1dfc984218967e958 Mon Sep 17 00:00:00 2001 From: nkorinek Date: Fri, 23 Jun 2023 12:17:15 -0600 Subject: [PATCH 27/77] duplicating docker build for both docker environments --- .github/workflows/build-push-image.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index 5b98344..ae8c397 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -17,6 +17,18 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Build and push image + id: website_docker_build + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile + push: true + tags: earthlab/r-python-eds-lessons-env:latest + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} + - name: Build and push image id: docker_build uses: docker/build-push-action@v2 From 36cd6b14627b9f589aa379f8e3917a6678e306f3 Mon Sep 17 00:00:00 2001 From: nkorinek Date: Tue, 27 Jun 2023 14:44:24 -0600 Subject: [PATCH 28/77] Updated Dockerfile to run --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78115c6..672ee22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM jupyter/minimal-notebook +FROM jupyter/minimal-notebook:python-3.10 USER jovyan @@ -6,6 +6,7 @@ RUN conda update conda RUN conda config --remove channels conda-forge RUN conda config --add channels conda-forge RUN conda config --set channel_priority strict +RUN conda install mamba -c conda-forge COPY environment.yml /home/jovyan/ RUN mamba env update -n base -f /home/jovyan/environment.yml @@ -26,4 +27,4 @@ RUN jupyter labextension install \ nbgrader \ && npm cache clean --force -RUN jupyter lab build +RUN jupyter lab build \ No newline at end of file From 2532a51fe3b7a35a914ab825d2fdd95f733f9e84 Mon Sep 17 00:00:00 2001 From: nkorinek Date: Tue, 27 Jun 2023 15:27:23 -0600 Subject: [PATCH 29/77] Changing ubuntu version due to possible bug with GitHub actions --- .github/workflows/build-for-docker.yml | 2 +- .github/workflows/build-test-envt.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-for-docker.yml b/.github/workflows/build-for-docker.yml index 2b8cebb..f73251b 100644 --- a/.github/workflows/build-for-docker.yml +++ b/.github/workflows/build-for-docker.yml @@ -5,7 +5,7 @@ on: workflow_dispatch jobs: runtests: name: "Set up environment" - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" defaults: run: shell: bash -l {0} diff --git a/.github/workflows/build-test-envt.yml b/.github/workflows/build-test-envt.yml index 975c15e..4356514 100644 --- a/.github/workflows/build-test-envt.yml +++ b/.github/workflows/build-test-envt.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "macos-latest", "windows-latest"] + os: ["ubuntu-22.04", "macos-latest", "windows-latest"] defaults: run: shell: bash -l {0} From 10086ac21b0fe430f579f7d5fd10c0e1b641dcb2 Mon Sep 17 00:00:00 2001 From: nkorinek Date: Tue, 27 Jun 2023 15:39:21 -0600 Subject: [PATCH 30/77] downgrading ubuntu build for github actions --- .github/workflows/build-for-docker.yml | 2 +- .github/workflows/build-test-envt.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-for-docker.yml b/.github/workflows/build-for-docker.yml index f73251b..bad69b9 100644 --- a/.github/workflows/build-for-docker.yml +++ b/.github/workflows/build-for-docker.yml @@ -5,7 +5,7 @@ on: workflow_dispatch jobs: runtests: name: "Set up environment" - runs-on: "ubuntu-22.04" + runs-on: "ubuntu-20.04" defaults: run: shell: bash -l {0} diff --git a/.github/workflows/build-test-envt.yml b/.github/workflows/build-test-envt.yml index 4356514..fbffc62 100644 --- a/.github/workflows/build-test-envt.yml +++ b/.github/workflows/build-test-envt.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-22.04", "macos-latest", "windows-latest"] + os: ["ubuntu-20.04", "macos-latest", "windows-latest"] defaults: run: shell: bash -l {0} From 90ff496bfa7568db4ad3c62efaf82c7252e4252e Mon Sep 17 00:00:00 2001 From: nkorinek Date: Mon, 21 Aug 2023 15:45:01 -0600 Subject: [PATCH 31/77] added packages to build jupyter books and improve plotting --- environment.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/environment.yml b/environment.yml index fadf2d0..5ab59c0 100644 --- a/environment.yml +++ b/environment.yml @@ -23,6 +23,7 @@ dependencies: - matplotlib - plotly - seaborn + - hvplot # Spatial packages - pysal @@ -60,6 +61,11 @@ dependencies: - jupyter_contrib_nbextensions - nbclean - nbresuse + + # Textbook Format + - jupyter-book + - sphinx-exercise + - ghp-import # QA - flake8 From a81b0da10687b8a33cac8b16b5653c767469b0d1 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 20 Sep 2023 11:05:34 -0600 Subject: [PATCH 32/77] Update environment.yml --- environment.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/environment.yml b/environment.yml index 5ab59c0..8b4202c 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,6 @@ name: earth-analytics-python channels: - conda-forge - defaults - - pytorch dependencies: - python=3.10 @@ -16,14 +15,13 @@ dependencies: # ML - scikit-learn - # - pytorch - # - torchvision # Plotting - matplotlib - plotly - seaborn - hvplot + - geoviews # Spatial packages - pysal @@ -33,7 +31,6 @@ dependencies: - cartopy - descartes - contextily - - earthpy - folium - geojson - mapboxgl @@ -42,7 +39,6 @@ dependencies: - tweepy - xarray - rioxarray>=0.3.0 - # - xarray-spatial - h5py - scipy - netcdf4 @@ -58,7 +54,6 @@ dependencies: - jupyterlab - notebook - ipython - - jupyter_contrib_nbextensions - nbclean - nbresuse From 803d1de434ba0f6d5f8c04f45c5cbf4d281b362b Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 20 Sep 2023 11:07:23 -0600 Subject: [PATCH 33/77] Update Dockerfile --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 672ee22..741070d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,9 @@ RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && python -m ipykernel install --user --name base RUN source /home/jovyan/.bash_profile +# Install dev version of Earthpy +RUN pip install git+https://github.com/earthlab/earthpy@apppears + # Install JupyterLab widget extensions RUN jupyter labextension install \ ipyvolume \ @@ -27,4 +30,4 @@ RUN jupyter labextension install \ nbgrader \ && npm cache clean --force -RUN jupyter lab build \ No newline at end of file +RUN jupyter lab build From 4540ef209c218002fc4a743b5ec1535531a74354 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 20 Sep 2023 11:09:07 -0600 Subject: [PATCH 34/77] Update build-push-image.yml --- .github/workflows/build-push-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index ae8c397..d5f37a6 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -36,7 +36,7 @@ jobs: context: ./ file: ./Dockerfile push: true - tags: earthlab/earth-analytics-python-env:latest + tags: earthlab/earth-analytics-dev-env:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From dec5306ab97ef18a98fa480347d6d7e6d6d912f1 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 20 Sep 2023 11:22:01 -0600 Subject: [PATCH 35/77] Update Dockerfile --- Dockerfile | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 741070d..5477a7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,15 +19,3 @@ RUN source /home/jovyan/.bash_profile # Install dev version of Earthpy RUN pip install git+https://github.com/earthlab/earthpy@apppears - -# Install JupyterLab widget extensions -RUN jupyter labextension install \ - ipyvolume \ - itkwidgets \ - jupyterlab_iframe \ - jupyter-leaflet \ - jupyter-threejs \ - nbgrader \ - && npm cache clean --force - -RUN jupyter lab build From 690d37f83b890f15db4975039d17db4ce4eff571 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 20 Sep 2023 13:12:12 -0600 Subject: [PATCH 36/77] Update Dockerfile --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5477a7b..2db8344 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,3 +19,6 @@ RUN source /home/jovyan/.bash_profile # Install dev version of Earthpy RUN pip install git+https://github.com/earthlab/earthpy@apppears + +# Install gnome keyring +RUN apt-get install -y gnome-keyring From 4981dfbc39b026fdb5baa3eaba04818e439ca8f1 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 20 Sep 2023 13:22:15 -0600 Subject: [PATCH 37/77] Update Dockerfile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2db8344..3e5f2ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,4 +21,6 @@ RUN source /home/jovyan/.bash_profile RUN pip install git+https://github.com/earthlab/earthpy@apppears # Install gnome keyring +USER root RUN apt-get install -y gnome-keyring +USER jovyan From deb0ecf3e1b5d02c210a8bf395725c3a13f7866a Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 20 Sep 2023 13:31:20 -0600 Subject: [PATCH 38/77] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3e5f2ea..19589b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,5 +22,5 @@ RUN pip install git+https://github.com/earthlab/earthpy@apppears # Install gnome keyring USER root -RUN apt-get install -y gnome-keyring +RUN apt-get install -y libgnome-keyring USER jovyan From 418db36de26522fdc282d5e0be97e2d341963fbb Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 20 Sep 2023 13:40:03 -0600 Subject: [PATCH 39/77] Update Dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 19589b5..bfcdfb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,5 +22,6 @@ RUN pip install git+https://github.com/earthlab/earthpy@apppears # Install gnome keyring USER root -RUN apt-get install -y libgnome-keyring +RUN apt-get install -y libdbus-glib-1-dev +RUN pip install secretstorage dbus-python USER jovyan From fdc54ef546cf174acfa5129fa46710884daec024 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 20 Sep 2023 13:50:52 -0600 Subject: [PATCH 40/77] REvert --- Dockerfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index bfcdfb3..5477a7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,9 +19,3 @@ RUN source /home/jovyan/.bash_profile # Install dev version of Earthpy RUN pip install git+https://github.com/earthlab/earthpy@apppears - -# Install gnome keyring -USER root -RUN apt-get install -y libdbus-glib-1-dev -RUN pip install secretstorage dbus-python -USER jovyan From bf9063eb5b5396bef383786415cb805185429398 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Thu, 28 Sep 2023 12:50:45 -0600 Subject: [PATCH 41/77] Update environment.yml --- environment.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 8b4202c..ce96fda 100644 --- a/environment.yml +++ b/environment.yml @@ -21,7 +21,9 @@ dependencies: - plotly - seaborn - hvplot - - geoviews + - geoviews>=1.10 + - selenium + - phantomjs # Spatial packages - pysal From dd57e6efa803a8385cb46692e67ee36693dbe1f2 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Thu, 28 Sep 2023 12:54:59 -0600 Subject: [PATCH 42/77] Update build-push-image.yml --- .github/workflows/build-push-image.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index d5f37a6..af1700a 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -17,18 +17,6 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Build and push image - id: website_docker_build - uses: docker/build-push-action@v2 - with: - context: ./ - file: ./Dockerfile - push: true - tags: earthlab/r-python-eds-lessons-env:latest - - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} - - name: Build and push image id: docker_build uses: docker/build-push-action@v2 From d8e7ed24fbb262ffc30e3ca53d4d0de279264cfa Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Fri, 6 Oct 2023 12:39:10 -0500 Subject: [PATCH 43/77] Update environment.yml --- environment.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/environment.yml b/environment.yml index ce96fda..1484382 100644 --- a/environment.yml +++ b/environment.yml @@ -24,6 +24,7 @@ dependencies: - geoviews>=1.10 - selenium - phantomjs + - jupyter_bokeh # Spatial packages - pysal @@ -46,6 +47,7 @@ dependencies: - netcdf4 - nc-time-axis - regionmask + - pyogrio # Natural language processing - nltk From aa6cf88ee2cdeb864f5b7142e0b3749c2aa4a424 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Mon, 27 Nov 2023 10:18:18 -0600 Subject: [PATCH 44/77] Update environment.yml --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 1484382..8ce4da2 100644 --- a/environment.yml +++ b/environment.yml @@ -42,6 +42,7 @@ dependencies: - tweepy - xarray - rioxarray>=0.3.0 + - xarray-spatial - h5py - scipy - netcdf4 From e391d6b27d1828578ed71a819ce4831914554c8d Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Mon, 27 Nov 2023 10:32:46 -0600 Subject: [PATCH 45/77] Update Dockerfile --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5477a7b..d630023 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,6 @@ RUN conda update conda RUN conda config --remove channels conda-forge RUN conda config --add channels conda-forge RUN conda config --set channel_priority strict -RUN conda install mamba -c conda-forge COPY environment.yml /home/jovyan/ RUN mamba env update -n base -f /home/jovyan/environment.yml From 184509bbea0dbcaf192c4221f92e69c6b79882a1 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Tue, 28 Nov 2023 14:11:35 -0600 Subject: [PATCH 46/77] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d630023..d1afab8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN conda config --add channels conda-forge RUN conda config --set channel_priority strict COPY environment.yml /home/jovyan/ -RUN mamba env update -n base -f /home/jovyan/environment.yml +RUN conda env update -n base -f /home/jovyan/environment.yml # using ~/.bash_profile instead of ~/.bashrc for non-interactive tty (-it) containers RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \ echo "conda deactivate" >> /home/jovyan/.bash_profile && \ From ce31cf0e5a8e58813f433bcd366894c2dbb2b938 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 10 Jan 2024 11:15:56 -0700 Subject: [PATCH 47/77] Update environment.yml --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 8ce4da2..3138bad 100644 --- a/environment.yml +++ b/environment.yml @@ -4,7 +4,7 @@ channels: - defaults dependencies: - - python=3.10 + - python=3.11 - pip # Core scientific python From d85d8902f036a8846cf50a4a88e0b5a39d9690a6 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 10 Jan 2024 11:29:27 -0700 Subject: [PATCH 48/77] Update Dockerfile --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index d1afab8..ff2ff13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,10 @@ FROM jupyter/minimal-notebook:python-3.10 USER jovyan +RUN apt-get update && \ + apt install -y \ + libfmt-dev + RUN conda update conda RUN conda config --remove channels conda-forge RUN conda config --add channels conda-forge From 4034d7d045eacb7e9343271ca59847cd1e8fc01b Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 10 Jan 2024 11:35:08 -0700 Subject: [PATCH 49/77] fix users for libfmt install --- Dockerfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff2ff13..aa9444b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,28 @@ FROM jupyter/minimal-notebook:python-3.10 -USER jovyan - +# Installing package for libmamba +USER root RUN apt-get update && \ apt install -y \ libfmt-dev +USER jovyan +# Set up conda RUN conda update conda RUN conda config --remove channels conda-forge RUN conda config --add channels conda-forge RUN conda config --set channel_priority strict +# Create environment COPY environment.yml /home/jovyan/ RUN conda env update -n base -f /home/jovyan/environment.yml -# using ~/.bash_profile instead of ~/.bashrc for non-interactive tty (-it) containers + +# Activating environment RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \ echo "conda deactivate" >> /home/jovyan/.bash_profile && \ echo "conda activate base" >> /home/jovyan/.bash_profile -RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && python -m ipykernel install --user --name base +RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && python -m ipykernel install --user --name base +# using ~/.bash_profile instead of ~/.bashrc for non-interactive tty (-it) containers RUN source /home/jovyan/.bash_profile # Install dev version of Earthpy From dfd5d0ab7a3c72b380e92bb526f22a6e3eb335c6 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 10 Jan 2024 11:39:56 -0700 Subject: [PATCH 50/77] Update build-push-image.yml --- .github/workflows/build-push-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index af1700a..6514ec5 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -19,7 +19,7 @@ jobs: - name: Build and push image id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5.1.0 with: context: ./ file: ./Dockerfile From a7f6305eb094fe4abeb607616d205e43290343cd Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 10 Jan 2024 12:10:01 -0700 Subject: [PATCH 51/77] add scikit-fuzzy --- environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 3138bad..f66c5e4 100644 --- a/environment.yml +++ b/environment.yml @@ -13,8 +13,9 @@ dependencies: - tqdm - kiwisolver - # ML + # ML and modeling - scikit-learn + - scikit-fuzzy # Plotting - matplotlib From 2cd44106e7889ad23cc3fe5db571929570edae21 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Fri, 12 Jan 2024 15:08:58 -0700 Subject: [PATCH 52/77] Adding pystac-client needed for data searching and access --- environment.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/environment.yml b/environment.yml index f66c5e4..1aec1a8 100644 --- a/environment.yml +++ b/environment.yml @@ -16,6 +16,10 @@ dependencies: # ML and modeling - scikit-learn - scikit-fuzzy + + # Data access + - earthpy + - pystac-client # Plotting - matplotlib From ea8084f44e813d09d78530ee1c7629c1def957bc Mon Sep 17 00:00:00 2001 From: earthlab Date: Thu, 18 Jan 2024 10:43:00 -0700 Subject: [PATCH 53/77] Chaning channel order and installing libmft-dev --- Dockerfile | 7 ++++--- environment.yml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa9444b..d9690d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM jupyter/minimal-notebook:python-3.10 +FROM jupyter/minimal-notebook:python-3.11 # Installing package for libmamba USER root RUN apt-get update && \ - apt install -y \ + apt-get install -y \ libfmt-dev USER jovyan @@ -11,7 +11,8 @@ USER jovyan RUN conda update conda RUN conda config --remove channels conda-forge RUN conda config --add channels conda-forge -RUN conda config --set channel_priority strict +#RUN conda config --set channel_priority strict +#RUN conda config --set solver classic # Create environment COPY environment.yml /home/jovyan/ diff --git a/environment.yml b/environment.yml index 1aec1a8..da5da64 100644 --- a/environment.yml +++ b/environment.yml @@ -1,7 +1,7 @@ name: earth-analytics-python channels: - - conda-forge - defaults + - conda-forge dependencies: - python=3.11 From 84c69434e1130a9728f97d1c9df9ec3a3bd5f438 Mon Sep 17 00:00:00 2001 From: Erick Verleye <35341779+Ckster@users.noreply.github.com> Date: Thu, 18 Jan 2024 11:01:03 -0700 Subject: [PATCH 54/77] Update build-push-image.yml --- .github/workflows/build-push-image.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index 6514ec5..84e3f6b 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -10,6 +10,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + ref: upgrade-to-3.9 - name: Login to DockerHub uses: docker/login-action@v1 From 8bcb38f1f207c2b73e31cc0af051d7925e5d02dd Mon Sep 17 00:00:00 2001 From: Erick Verleye <35341779+Ckster@users.noreply.github.com> Date: Thu, 18 Jan 2024 14:36:28 -0700 Subject: [PATCH 55/77] Update build-test-envt.yml --- .github/workflows/build-test-envt.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-test-envt.yml b/.github/workflows/build-test-envt.yml index fbffc62..c16a50a 100644 --- a/.github/workflows/build-test-envt.yml +++ b/.github/workflows/build-test-envt.yml @@ -19,6 +19,8 @@ jobs: shell: bash -l {0} steps: - uses: actions/checkout@v2 + with: + ref: upgrade-to-3.9 - uses: conda-incubator/setup-miniconda@v2 with: miniconda-version: 'latest' From 989149f545090db7580f4488b4a4ace0cff40a4c Mon Sep 17 00:00:00 2001 From: Erick Verleye <35341779+Ckster@users.noreply.github.com> Date: Tue, 26 Mar 2024 11:32:37 -0600 Subject: [PATCH 56/77] Update environment.yml Adding libtiff to environment.yml for macOS build --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index da5da64..b55e533 100644 --- a/environment.yml +++ b/environment.yml @@ -32,6 +32,7 @@ dependencies: - jupyter_bokeh # Spatial packages + - libtiff - pysal - pyproj>=3.0 - rasterstats From f6719f62cdd14e3e839c030db0847effa3c1b6e9 Mon Sep 17 00:00:00 2001 From: earthlab Date: Tue, 23 Apr 2024 13:15:44 -0600 Subject: [PATCH 57/77] Adding libtiff5 for geopandas --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d9690d8..efe33dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,9 @@ FROM jupyter/minimal-notebook:python-3.11 USER root RUN apt-get update && \ apt-get install -y \ - libfmt-dev + libfmt-dev \ + libtiff5 + USER jovyan # Set up conda From b1575704081003b200bb5fc28326990a21ed2dad Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Fri, 21 Jun 2024 12:58:11 -0600 Subject: [PATCH 58/77] Update environment.yml --- environment.yml | 81 +++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 47 deletions(-) diff --git a/environment.yml b/environment.yml index b55e533..ebe1059 100644 --- a/environment.yml +++ b/environment.yml @@ -9,9 +9,34 @@ dependencies: # Core scientific python - numpy - - pyqt + - pandas + - scipy + + # Geospatial libraries + # Coordinates and CRSs + - pyproj>=3.0 + - geopy + - cartopy + # Vector data + - geopandas + - geojson + - pyogrio + # Raster data + - xarray + - h5py + - netcdf4 + - rioxarray>=0.3.0 + - xarray-spatial + - regionmask + + # Interactive computing + - ipython + - jupyterlab + - notebook - tqdm - - kiwisolver + - nbresuse + - papermill + - nbclean # ML and modeling - scikit-learn @@ -19,59 +44,24 @@ dependencies: # Data access - earthpy + - earthaccess - pystac-client # Plotting + # Matplotlib - matplotlib - - plotly + - nc-time-axis + - descartes + - contextily - seaborn + # Holoviews - hvplot - geoviews>=1.10 - selenium - phantomjs - jupyter_bokeh - - # Spatial packages - - libtiff - - pysal - - pyproj>=3.0 - - rasterstats - - geopy - - cartopy - - descartes - - contextily + # Folium - folium - - geojson - - mapboxgl - - hydrofunctions - - geocoder - - tweepy - - xarray - - rioxarray>=0.3.0 - - xarray-spatial - - h5py - - scipy - - netcdf4 - - nc-time-axis - - regionmask - - pyogrio - - # Natural language processing - - nltk - - textblob - - # Jupyter Environment - - papermill - - jupyterlab - - notebook - - ipython - - nbclean - - nbresuse - - # Textbook Format - - jupyter-book - - sphinx-exercise - - ghp-import # QA - flake8 @@ -80,6 +70,3 @@ dependencies: - autopep8 - pydocstyle - nbqa - - # Autograding - - nbgrader From 2b9890918495228c157b70ae921d13ca2c6f2607 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Fri, 21 Jun 2024 13:00:38 -0600 Subject: [PATCH 59/77] Update build-test-envt.yml --- .github/workflows/build-test-envt.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build-test-envt.yml b/.github/workflows/build-test-envt.yml index 975c15e..8842ce6 100644 --- a/.github/workflows/build-test-envt.yml +++ b/.github/workflows/build-test-envt.yml @@ -1,7 +1,3 @@ -# This workflow runs tests for earthpy -# Because we want a conda environment - and that builds slower, -# we divided up tests from linting and docs to make for simpler install envts - name: Test EA Python Envt Mac, Linux, Windows on: workflow_dispatch @@ -19,7 +15,7 @@ jobs: shell: bash -l {0} steps: - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v3.0.4 with: miniconda-version: 'latest' channels: conda-forge From 875326a6edb907d090cc93616757e78b61153abb Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Fri, 21 Jun 2024 13:01:34 -0600 Subject: [PATCH 60/77] Update build-test-envt.yml --- .github/workflows/build-test-envt.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-envt.yml b/.github/workflows/build-test-envt.yml index c16a50a..8807081 100644 --- a/.github/workflows/build-test-envt.yml +++ b/.github/workflows/build-test-envt.yml @@ -18,10 +18,10 @@ jobs: run: shell: bash -l {0} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.1.7 with: ref: upgrade-to-3.9 - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v3.0.4 with: miniconda-version: 'latest' channels: conda-forge From 85c7654e949d4fcc448828d531d1db61b992b472 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Fri, 21 Jun 2024 13:06:58 -0600 Subject: [PATCH 61/77] Update environment.yml --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index ebe1059..a6b5ae9 100644 --- a/environment.yml +++ b/environment.yml @@ -23,6 +23,7 @@ dependencies: - pyogrio # Raster data - xarray + - libtiff - h5py - netcdf4 - rioxarray>=0.3.0 From d6a8fadcb8a6e481fa755b153563d9da1beb3c6f Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Fri, 21 Jun 2024 13:15:08 -0600 Subject: [PATCH 62/77] Update environment.yml --- environment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environment.yml b/environment.yml index a6b5ae9..ebe1059 100644 --- a/environment.yml +++ b/environment.yml @@ -23,7 +23,6 @@ dependencies: - pyogrio # Raster data - xarray - - libtiff - h5py - netcdf4 - rioxarray>=0.3.0 From cb3d64ae550a212e838323c82d5caf4bba91299f Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Fri, 21 Jun 2024 13:24:17 -0600 Subject: [PATCH 63/77] Update build-test-envt.yml --- .github/workflows/build-test-envt.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-test-envt.yml b/.github/workflows/build-test-envt.yml index 8807081..f5ebf41 100644 --- a/.github/workflows/build-test-envt.yml +++ b/.github/workflows/build-test-envt.yml @@ -1,7 +1,3 @@ -# This workflow runs tests for earthpy -# Because we want a conda environment - and that builds slower, -# we divided up tests from linting and docs to make for simpler install envts - name: Test EA Python Envt Mac, Linux, Windows on: workflow_dispatch @@ -16,20 +12,16 @@ jobs: os: ["ubuntu-20.04", "macos-latest", "windows-latest"] defaults: run: - shell: bash -l {0} + shell: bash -el {0} steps: - uses: actions/checkout@v4.1.7 with: ref: upgrade-to-3.9 - uses: conda-incubator/setup-miniconda@v3.0.4 with: - miniconda-version: 'latest' - channels: conda-forge - channel-priority: true - auto-update-conda: false auto-activate-base: false environment-file: environment.yml activate-environment: earth-analytics-python - run: conda list - run: python -c "import earthpy" - - run: python -c "import rasterio" + - run: python -c "import rioxarray" From 6765c27aa945039e593056f56a6a936a897f256a Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Fri, 21 Jun 2024 13:36:57 -0600 Subject: [PATCH 64/77] Update build-test-envt.yml --- .github/workflows/build-test-envt.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-envt.yml b/.github/workflows/build-test-envt.yml index f5ebf41..ed6d5ec 100644 --- a/.github/workflows/build-test-envt.yml +++ b/.github/workflows/build-test-envt.yml @@ -9,14 +9,18 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-20.04", "macos-latest", "windows-latest"] + os: + - "ubuntu-20.04" + - "macos-latest-large" + - "macos-latest-xlarge" + - "windows-latest" defaults: run: shell: bash -el {0} steps: - uses: actions/checkout@v4.1.7 with: - ref: upgrade-to-3.9 + ref: ${{ github.head_ref || github.ref_name }} - uses: conda-incubator/setup-miniconda@v3.0.4 with: auto-activate-base: false @@ -24,4 +28,5 @@ jobs: activate-environment: earth-analytics-python - run: conda list - run: python -c "import earthpy" + - run: python -c "import geopandas" - run: python -c "import rioxarray" From c7c4823597321523637dae3a49c1eaf45db2d485 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Fri, 21 Jun 2024 13:45:40 -0600 Subject: [PATCH 65/77] Update build-test-envt.yml --- .github/workflows/build-test-envt.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-envt.yml b/.github/workflows/build-test-envt.yml index ed6d5ec..e14957c 100644 --- a/.github/workflows/build-test-envt.yml +++ b/.github/workflows/build-test-envt.yml @@ -10,9 +10,9 @@ jobs: fail-fast: false matrix: os: - - "ubuntu-20.04" - - "macos-latest-large" - - "macos-latest-xlarge" + - "ubuntu-latest" + - "macos-13" + - "macos-latest" - "windows-latest" defaults: run: From 6295b69d2e291fff842d69740cff2fd0aede73ef Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Fri, 21 Jun 2024 13:48:21 -0600 Subject: [PATCH 66/77] Update environment.yml --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index ebe1059..87d2688 100644 --- a/environment.yml +++ b/environment.yml @@ -1,7 +1,7 @@ name: earth-analytics-python channels: - - defaults - conda-forge + - defaults dependencies: - python=3.11 From b2b0a28cac1569b23aef3760342235a1ffd3cb6e Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Tue, 1 Oct 2024 13:37:15 -0600 Subject: [PATCH 67/77] Update build-push-image.yml --- .github/workflows/build-push-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index 84e3f6b..ba4024b 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -26,7 +26,7 @@ jobs: context: ./ file: ./Dockerfile push: true - tags: earthlab/earth-analytics-dev-env:latest + tags: earthlab/earth-analytics-python-env:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From faf5bf3a83b0bbb54e8e2ac9d43fdce875028d53 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 2 Oct 2024 14:39:15 -0600 Subject: [PATCH 68/77] Update build-push-image.yml --- .github/workflows/build-push-image.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index ba4024b..56d44ac 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -10,8 +10,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - with: - ref: upgrade-to-3.9 - name: Login to DockerHub uses: docker/login-action@v1 From bb47d9d658bd4f563b8798efc2d3b8558d460e3a Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 2 Oct 2024 17:35:23 -0600 Subject: [PATCH 69/77] Update Dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index efe33dc..01e415d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,8 @@ RUN conda config --add channels conda-forge # Create environment COPY environment.yml /home/jovyan/ -RUN conda env update -n base -f /home/jovyan/environment.yml +RUN conda install -n base -c conda-forge mamba +RUN mamba env update -n base -f /home/jovyan/environment.yml # Activating environment RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \ From a644c844eca1b87c0f00b2fb93e0081205dfaeb8 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Mon, 19 May 2025 13:25:36 -0600 Subject: [PATCH 70/77] Update environment.yml --- environment.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 87d2688..82a481c 100644 --- a/environment.yml +++ b/environment.yml @@ -4,13 +4,14 @@ channels: - defaults dependencies: - - python=3.11 + - python=3.12 - pip # Core scientific python - numpy - pandas - scipy + - dask # Geospatial libraries # Coordinates and CRSs @@ -46,6 +47,9 @@ dependencies: - earthpy - earthaccess - pystac-client + - adlfs + - dataretrieval + - osmnx # Plotting # Matplotlib @@ -55,6 +59,8 @@ dependencies: - contextily - seaborn # Holoviews + # --- Avoid compatibility issues with bokeh and new holoviews + - holoviews<=1.19 - hvplot - geoviews>=1.10 - selenium @@ -70,3 +76,6 @@ dependencies: - autopep8 - pydocstyle - nbqa + + - pip: + - pygbif From 366e59ea8a36287cbb90bd02a8eee3dd39bbfb7b Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Mon, 19 May 2025 16:06:52 -0600 Subject: [PATCH 71/77] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 01e415d..530052c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,4 +30,4 @@ RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && python -m ipyk RUN source /home/jovyan/.bash_profile # Install dev version of Earthpy -RUN pip install git+https://github.com/earthlab/earthpy@apppears +RUN pip install git+https://github.com/earthlab/earthpy@main From f61ecbc9c6d4df8eeb638cd4eef24c5743a3452b Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Mon, 19 May 2025 16:47:36 -0600 Subject: [PATCH 72/77] Update Dockerfile --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 530052c..93824a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,13 +13,10 @@ USER jovyan RUN conda update conda RUN conda config --remove channels conda-forge RUN conda config --add channels conda-forge -#RUN conda config --set channel_priority strict -#RUN conda config --set solver classic # Create environment COPY environment.yml /home/jovyan/ -RUN conda install -n base -c conda-forge mamba -RUN mamba env update -n base -f /home/jovyan/environment.yml +RUN conda env update -n base -f /home/jovyan/environment.yml # Activating environment RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \ From 8f8c8d05d30e707cf259c534a73d8b9b4cc8bfab Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Mon, 19 May 2025 17:51:00 -0600 Subject: [PATCH 73/77] Update Dockerfile to 3.12 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 93824a6..7f2e45c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM jupyter/minimal-notebook:python-3.11 +FROM jupyter/minimal-notebook:python-3.12 # Installing package for libmamba USER root From f57459433b8f6f0d2d60c3c0f5dc4dec80df9132 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Mon, 19 May 2025 18:01:06 -0600 Subject: [PATCH 74/77] Use miniconda instead of jupyter base image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7f2e45c..543b80a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM jupyter/minimal-notebook:python-3.12 +FROM continuumio/miniconda3:25.1.1-2 # Installing package for libmamba USER root From a9c6cb6e3f28ffc039d2fcf1e98b139862db28a5 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Tue, 20 May 2025 07:34:11 -0600 Subject: [PATCH 75/77] Update environment.yml --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 82a481c..d495389 100644 --- a/environment.yml +++ b/environment.yml @@ -4,7 +4,7 @@ channels: - defaults dependencies: - - python=3.12 + - python=3.11 - pip # Core scientific python From c99fb91cfc58ebb643e621f673a9ab644ab05bb8 Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Tue, 20 May 2025 07:35:57 -0600 Subject: [PATCH 76/77] Reverting to 3.11 -- base images are not compatible --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 543b80a..93824a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM continuumio/miniconda3:25.1.1-2 +FROM jupyter/minimal-notebook:python-3.11 # Installing package for libmamba USER root From b53f77b2cf87bdf9fb764f8aff9a6f0b20969e1b Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Tue, 20 May 2025 07:52:56 -0600 Subject: [PATCH 77/77] Update Dockerfile --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 93824a6..530052c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,10 +13,13 @@ USER jovyan RUN conda update conda RUN conda config --remove channels conda-forge RUN conda config --add channels conda-forge +#RUN conda config --set channel_priority strict +#RUN conda config --set solver classic # Create environment COPY environment.yml /home/jovyan/ -RUN conda env update -n base -f /home/jovyan/environment.yml +RUN conda install -n base -c conda-forge mamba +RUN mamba env update -n base -f /home/jovyan/environment.yml # Activating environment RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \