diff --git a/.github/workflows/publish_sar_image.yaml b/.github/workflows/publish_sar_image.yaml index b5d1b44..1ee29c4 100644 --- a/.github/workflows/publish_sar_image.yaml +++ b/.github/workflows/publish_sar_image.yaml @@ -7,14 +7,14 @@ on: # yamllint disable-line rule:truthy workflow_dispatch: {} push: - branches: ['main', 'test'] + branches: ["main", "test"] tags: - "v*.*.*" # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }}_sar + IMAGE_NAME: ${{ github.repository }}_earthscope # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. jobs: @@ -56,7 +56,7 @@ jobs: id: push uses: docker/build-push-action@v6.10.0 with: - context: images/sar + context: images/earthscope push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/images/dasklab/.gitignore b/images/dasklab/.gitignore deleted file mode 100644 index e00aff4..0000000 --- a/images/dasklab/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -* -!.gitignore -!build.sh -!Dockerfile -!etc/ -!etc/* diff --git a/images/dasklab/Dockerfile b/images/dasklab/Dockerfile deleted file mode 100644 index f691afb..0000000 --- a/images/dasklab/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM jupyter/base-notebook:lab-4.0.7 AS release - -USER root -WORKDIR / - -RUN set -ve - -# ignore DL3059 to make the two codeblocks distinct -# hadolint ignore=DL3059 -RUN mamba install -c conda-forge -y \ - dask-gateway \ - dask=='2024.1.0' \ - distributed=='2024.1.0' \ - ipywidgets \ - -- - -COPY ./etc/gateway_access_example.ipynb /etc/singleuser/notebooks/gateway_access_example.ipynb - -WORKDIR /home/jovyan -USER jovyan - - -########################################## - -FROM release AS testing diff --git a/images/dasklab/build.sh b/images/dasklab/build.sh deleted file mode 100644 index ffc37bd..0000000 --- a/images/dasklab/build.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -ex - -cp Dockerfile dockerfile.build - -BUILD_TAG=$(date +"%F-%H-%M-%S") -COMMIT_HEAD=$(git rev-parse --short HEAD) - -IMAGE_NAME=$1 - -time docker build -f dockerfile.build --target testing . -time docker build -f dockerfile.build \ - -t "$DOCKER_REGISTRY"/"$IMAGE_NAME":"$BUILD_TAG" \ - -t "$DOCKER_REGISTRY"/"$IMAGE_NAME":latest \ - -t "$DOCKER_REGISTRY"/"$IMAGE_NAME":"$COMMIT_HEAD" \ - --target release . - -# Push to registry -docker push "$DOCKER_REGISTRY"/"$IMAGE_NAME":"$BUILD_TAG" -docker push "$DOCKER_REGISTRY"/"$IMAGE_NAME":latest -docker push "$DOCKER_REGISTRY"/"$IMAGE_NAME":"$COMMIT_HEAD" diff --git a/images/dasklab/etc/gateway_access_example.ipynb b/images/dasklab/etc/gateway_access_example.ipynb deleted file mode 100644 index af3ac5a..0000000 --- a/images/dasklab/etc/gateway_access_example.ipynb +++ /dev/null @@ -1,179 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "4e0216cb-1bd5-4b66-8271-563bc7131a25", - "metadata": {}, - "source": [ - "Documentaion at https://gateway.dask.org/" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "691d9b36-9aae-482f-8c22-1fa42c9e31d5", - "metadata": {}, - "outputs": [], - "source": [ - "from dask_gateway import Gateway\n", - "import dask.array as da\n", - "import logging" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6e43c5f1-6548-4929-9ecd-ffbdd1c6165f", - "metadata": {}, - "outputs": [], - "source": [ - "# Use default gateway settings found in ~/.config/dask/gateway.yaml or /etc/dask/gateway.yaml\n", - "gateway = Gateway()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4fe2ad2f-cba7-45a4-a4fa-4a29fb4caa1b", - "metadata": {}, - "outputs": [], - "source": [ - "# Get list of active gateway clusters.\n", - "gateway_clusters = gateway.list_clusters()\n", - "gateway_clusters" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "eb7bdc3a-e863-4215-bc86-834da83ebb5a", - "metadata": {}, - "outputs": [], - "source": [ - "gateway.address" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a6f63ca6-79d2-4c9f-b93e-4c32bc5718de", - "metadata": {}, - "outputs": [], - "source": [ - "options = gateway.cluster_options()\n", - "options" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "95d2dfc4-ab9e-4145-9ace-2e533f33daf8", - "metadata": {}, - "outputs": [], - "source": [ - "if len(gateway_clusters) == 0:\n", - " cluster = gateway.new_cluster()\n", - "else:\n", - " cluster = gateway.connect(gateway_clusters[0].name)\n", - "\n", - "cluster.scale(1)\n", - "cluster" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "7a46525a-324c-4960-8fd3-71dcca08c7fb", - "metadata": {}, - "outputs": [], - "source": [ - "client = cluster.get_client()\n", - "client" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "972b06a6-8144-459d-b71f-3fa507fdb482", - "metadata": {}, - "outputs": [], - "source": [ - "# Example 1\n", - "# Use implicit client to do calculation\n", - "\n", - "a = da.random.normal(size=(1000, 1000), chunks=(500, 500))\n", - "a.mean().compute()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a69a8f23-979a-4665-b66c-1668f15eb362", - "metadata": {}, - "outputs": [], - "source": [ - "# Example 2\n", - "# Submitting and running function to client\n", - "def example2(name):\n", - " logging.info(name)\n", - " return name\n", - "\n", - "\n", - "future1 = client.submit(example2, \"qwerty\")\n", - "answer1 = future1.result()\n", - "print(answer1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0442742e-be6a-4ddd-9a69-dc0f4b2a8e64", - "metadata": {}, - "outputs": [], - "source": [ - "# Example 3\n", - "# Submitting and throwing error exception\n", - "def example3(name):\n", - " logging.info(name)\n", - " raise Exception(\"Oh no!!\")\n", - " return name\n", - "\n", - "\n", - "future2 = client.submit(example3, \"qwerty\")\n", - "answer2 = future2.result()\n", - "print(answer2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "daeae24b-0d45-4fcc-ad1c-8be8c3a51a76", - "metadata": {}, - "outputs": [], - "source": [ - "cluster.shutdown()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.6" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/images/daskworker/Dockerfile b/images/daskworker/Dockerfile deleted file mode 100644 index 3513293..0000000 --- a/images/daskworker/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# https://github.com/dask/dask-docker/tree/main -# Make sure that the python lib verions here match the minor versions of dask-gateway found in the notebook image -FROM ghcr.io/dask/dask:2024.1.0 as release - -# ignore DL3008 because pinning is not desired -# hadolint ignore=DL3008 -RUN apt-get update &&\ - apt-get upgrade -y &&\ - apt-get install --no-install-recommends --fix-missing -y \ - curl &&\ - mamba install -c conda-forge -y \ - python=3.11.6 \ - pandas=2.2 \ - tornado=6.3 \ - boto3 \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -########################################## - -FROM release as testing diff --git a/images/daskworker/build.sh b/images/daskworker/build.sh deleted file mode 100644 index 0805995..0000000 --- a/images/daskworker/build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -set -ex - -cp Dockerfile dockerfile.build - -BUILD_TAG=$(date +"%F-%H-%M-%S") -COMMIT_HEAD=$(git rev-parse --short HEAD) - -IMAGE_NAME="$1" - -time docker build -f dockerfile.build --target testing . -time docker build -f dockerfile.build \ - -t "$DOCKER_REGISTRY/$IMAGE_NAME:$BUILD_TAG" \ - -t "$DOCKER_REGISTRY/$IMAGE_NAME:latest" \ - -t "$DOCKER_REGISTRY/$IMAGE_NAME:$COMMIT_HEAD" \ - --target release . - -# Push to registry -docker push "$DOCKER_REGISTRY/$IMAGE_NAME:$BUILD_TAG" -docker push "$DOCKER_REGISTRY/$IMAGE_NAME:latest" -docker push "$DOCKER_REGISTRY/$IMAGE_NAME:$COMMIT_HEAD" diff --git a/images/opera/.gitignore b/images/earthscope/.gitignore similarity index 68% rename from images/opera/.gitignore rename to images/earthscope/.gitignore index f5fed42..39a9213 100644 --- a/images/opera/.gitignore +++ b/images/earthscope/.gitignore @@ -3,9 +3,5 @@ !build.sh !Dockerfile !download.sh -!pkgs -!pkgs/** !environment !environment/** -!configs -!configs/** diff --git a/images/sar/Dockerfile b/images/earthscope/Dockerfile similarity index 78% rename from images/sar/Dockerfile rename to images/earthscope/Dockerfile index 0345c1f..9472221 100644 --- a/images/sar/Dockerfile +++ b/images/earthscope/Dockerfile @@ -14,8 +14,8 @@ RUN apt-get update # ignore DL3009 since deleting apt-get lists makes later installs fail # hadolint ignore=DL3008,DL3009 RUN apt-get install --no-install-recommends -y \ - software-properties-common \ - git && \ + software-properties-common \ + git && \ apt-get install --no-install-recommends -y gpg-agent && \ add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable && \ apt-get update && \ @@ -104,26 +104,26 @@ RUN mamba install -c conda-forge -y \ # ignore DL3013 since pinning packages is not desired # hadolint ignore=DL3013,DL3059 RUN python3 -m pip install --no-cache-dir \ - ### For ASF - url-widget \ - opensarlab-frontend==1.5.1 \ - jupyterlab-jupyterbook-navigation==0.2.0 \ - jupyterlab_myst \ - ### For pyGMTSAR - pygmtsar + ### For ASF + url-widget \ + opensarlab-frontend==1.5.1 \ + jupyterlab-jupyterbook-navigation==0.2.0 \ + jupyterlab_myst \ + ### For pyGMTSAR + pygmtsar WORKDIR / RUN mkdir -p /tmp/build/GMTSAR /usr/local/GMTSAR &&\ - git clone --branch master https://github.com/gmtsar/gmtsar /tmp/build/GMTSAR/ + git clone --branch master https://github.com/gmtsar/gmtsar /tmp/build/GMTSAR/ WORKDIR /tmp/build/GMTSAR RUN autoconf &&\ - ./configure --with-orbits-dir=/tmp CFLAGS='-z muldefs' LDFLAGS='-z muldefs' &&\ - make &&\ - make install &&\ - mv -v /tmp/build/GMTSAR/bin /usr/local/GMTSAR/bin &&\ - rm -rf /tmp/build + ./configure --with-orbits-dir=/tmp CFLAGS='-z muldefs' LDFLAGS='-z muldefs' &&\ + make &&\ + make install &&\ + mv -v /tmp/build/GMTSAR/bin /usr/local/GMTSAR/bin &&\ + rm -rf /tmp/build WORKDIR / - ### Extra stuff - # Make sure that any files in the home directory are jovyan permission +### Extra stuff +# Make sure that any files in the home directory are jovyan permission RUN chown -R jovyan:users "$HOME/" &&\ # Make sure mamba (within conda) has write access chmod -R 777 /opt/conda/pkgs/ &&\ @@ -143,5 +143,13 @@ RUN chown -R jovyan:users "$HOME/" &&\ ### GMTSAR ENV PATH=/usr/local/GMTSAR/bin:$PATH +## Build extra mamba environment +COPY environment/environment.yaml /tmp/environment.yaml + +RUN mamba env create -f /tmp/environment.yaml &&\ + python3 -m ipykernel install --prefix /opt/conda/envs/earthscope_insar --name earthscope_insar --display-name "earthscope_insar" &&\ + rm -rf /opt/conda/pkgs/cache &&\ + conda env config vars set -n earthscope_insar EARTHSCOPE_HELLO_WORLD="HELLO THERE" + WORKDIR /home/jovyan USER jovyan \ No newline at end of file diff --git a/images/opera/build.sh b/images/earthscope/build.sh similarity index 100% rename from images/opera/build.sh rename to images/earthscope/build.sh diff --git a/images/opera/download.sh b/images/earthscope/download.sh similarity index 100% rename from images/opera/download.sh rename to images/earthscope/download.sh diff --git a/images/earthscope/environment/environment.yaml b/images/earthscope/environment/environment.yaml new file mode 100644 index 0000000..9d1828a --- /dev/null +++ b/images/earthscope/environment/environment.yaml @@ -0,0 +1,424 @@ +--- +name: earthscope_insar +channels: + - conda-forge + - pyrocko +dependencies: + - _libgcc_mutex=0.1=conda_forge + - _openmp_mutex=4.5=2_gnu + - affine=2.4.0=pyhd8ed1ab_0 + - alsa-lib=1.2.8=h166bdaf_0 + - annotated-types=0.7.0=pyhd8ed1ab_0 + - aom=3.5.0=h27087fc_0 + - argcomplete=3.4.0=pyhd8ed1ab_0 + - aria-tools=1.1.9=py311hd037940_0 + - asf_search=7.1.4=pyhd8ed1ab_0 + - asf_search-base=7.1.4=pyhd8ed1ab_0 + - asttokens=2.4.1=pyhd8ed1ab_0 + - attr=2.5.1=h166bdaf_1 + - attrs=23.2.0=pyh71513ae_0 + - autorift=1.5.0=py311hc8c2753_2 + - blosc=1.21.6=hef167b5_0 + - bokeh=2.4.3=pyhd8ed1ab_3 + - boost-cpp=1.78.0=h5adbc97_2 + - boto3=1.34.152=pyhd8ed1ab_0 + - botocore=1.34.152=pyge310_1234567_0 + - branca=0.7.2=pyhd8ed1ab_0 + - brotli=1.1.0=hd590300_1 + - brotli-bin=1.1.0=hd590300_1 + - brotli-python=1.1.0=py311hb755f60_1 + - bzip2=1.0.8=h4bc722e_7 + - c-ares=1.32.3=h4bc722e_0 + - ca-certificates=2024.7.4=hbcca054_0 + - cached-property=1.5.2=hd8ed1ab_1 + - cached_property=1.5.2=pyha770c72_1 + - cads-api-client=1.2.0=pyhd8ed1ab_0 + - cairo=1.16.0=ha61ee94_1012 + - cartopy=0.23.0=py311h14de704_1 + - cdsapi=0.7.0=pyhd8ed1ab_0 + - certifi=2024.7.4=pyhd8ed1ab_0 + - cffi=1.16.0=py311hb3a22ac_0 + - cfgv=3.3.1=pyhd8ed1ab_0 + - cfitsio=4.2.0=hd9d235c_0 + - cftime=1.6.4=py311h18e1886_0 + - charset-normalizer=3.3.2=pyhd8ed1ab_0 + - ciso8601=2.3.1=py311h459d7ec_0 + - click=8.1.7=unix_pyh707e725_0 + - click-plugins=1.1.1=py_0 + - cligj=0.7.2=pyhd8ed1ab_1 + - cloudpickle=3.0.0=pyhd8ed1ab_0 + - colorama=0.4.6=pyhd8ed1ab_0 + - comm=0.2.2=pyhd8ed1ab_0 + - configobj=5.0.8=pyhd8ed1ab_0 + - contourpy=1.2.1=py311h9547e67_0 + - curl=8.1.2=h409715c_0 + - cvxopt=1.3.2=py311h2b3fd1d_1 + - cycler=0.12.1=pyhd8ed1ab_0 + - cytoolz=0.12.3=py311h459d7ec_0 + - dask=2023.3.0=pyhd8ed1ab_0 + - dask-core=2023.3.0=pyhd8ed1ab_0 + - dask-jobqueue=0.8.5=pyhd8ed1ab_0 + - dateparser=1.2.0=pyhd8ed1ab_0 + - dbus=1.13.6=h5008d03_3 + - debugpy=1.8.2=py311h4332511_0 + - decorator=5.1.1=pyhd8ed1ab_0 + - dem_stitcher=2.5.8=pyhd8ed1ab_0 + - distlib=0.3.8=pyhd8ed1ab_0 + - distributed=2023.3.0=pyhd8ed1ab_0 + - donfig=0.8.1.post1=pyhd8ed1ab_0 + - dsdp=5.8=hd9d9efa_1203 + - eccodes=2.29.0=h54fcba4_0 + - exceptiongroup=1.2.2=pyhd8ed1ab_0 + - executing=2.0.1=pyhd8ed1ab_0 + - expat=2.6.2=h59595ed_0 + - ffmpeg=5.1.2=gpl_h8dda1f0_106 + - fftw=3.3.10=nompi_hf1063bd_110 + - filelock=3.15.4=pyhd8ed1ab_0 + - fiona=1.9.1=py311h3f14cef_0 + - folium=0.17.0=pyhd8ed1ab_0 + - font-ttf-dejavu-sans-mono=2.37=hab24e00_0 + - font-ttf-inconsolata=3.000=h77eed37_0 + - font-ttf-source-code-pro=2.038=h77eed37_0 + - font-ttf-ubuntu=0.83=h77eed37_2 + - fontconfig=2.14.2=h14ed4e7_0 + - fonts-conda-ecosystem=1=0 + - fonts-conda-forge=1=0 + - fonttools=4.53.1=py311h61187de_0 + - freeglut=3.2.2=h9c3ff4c_1 + - freetype=2.12.1=h267a509_2 + - freexl=1.0.6=h166bdaf_1 + - fsspec=2024.6.1=pyhff2d567_0 + - gdal=3.6.2=py311hadb6153_9 + - geopandas=0.14.4=pyhd8ed1ab_0 + - geopandas-base=0.14.4=pyha770c72_0 + - geos=3.11.1=h27087fc_0 + - geotiff=1.7.1=h7a142b4_6 + - gettext=0.22.5=h59595ed_2 + - gettext-tools=0.22.5=h59595ed_2 + - giflib=5.2.2=hd590300_0 + - glib=2.78.1=hfc55251_0 + - glib-tools=2.78.1=hfc55251_0 + - glpk=5.0=h445213a_0 + - gmp=6.3.0=hac33072_2 + - gnutls=3.7.9=hb077bed_0 + - graphite2=1.3.13=h59595ed_1003 + - gsl=2.7=he838d99_0 + - gst-plugins-base=1.22.0=h4243ec0_2 + - gstreamer=1.22.0=h25f0c4b_2 + - gstreamer-orc=0.4.39=h4bc722e_0 + - h2=4.1.0=pyhd8ed1ab_0 + - h5py=3.8.0=nompi_py311h1db17ec_100 + - harfbuzz=6.0.0=h8e241bc_0 + - hdf4=4.2.15=h9772cbc_5 + - hdf5=1.12.2=nompi_h4df4325_101 + - hpack=4.0.0=pyh9f0ad1d_0 + - hyp3_sdk=7.0.1=pyhd8ed1ab_0 + - hyperframe=6.0.1=pyhd8ed1ab_0 + - icu=70.1=h27087fc_0 + - identify=2.6.0=pyhd8ed1ab_0 + - idna=3.7=pyhd8ed1ab_0 + - imagecodecs-lite=2019.12.3=py311h18e1886_8 + - imageio=2.34.2=pyh12aca89_0 + - importlib-metadata=8.2.0=pyha770c72_0 + - importlib_metadata=8.2.0=hd8ed1ab_0 + - iniconfig=2.0.0=pyhd8ed1ab_0 + - ipykernel=6.29.5=pyh3099207_0 + - ipympl=0.9.4=pyhd8ed1ab_0 + - ipython=8.26.0=pyh707e725_0 + - ipython_genutils=0.2.0=pyhd8ed1ab_1 + - ipywidgets=8.1.3=pyhd8ed1ab_0 + - isce2=2.6.3=py311h1e919c0_0 + - jack=1.9.22=h11f4161_0 + - jasper=2.0.33=h0ff4b12_1 + - jedi=0.19.1=pyhd8ed1ab_0 + - jinja2=3.1.4=pyhd8ed1ab_0 + - jmespath=1.0.1=pyhd8ed1ab_0 + - joblib=1.4.2=pyhd8ed1ab_0 + - jpeg=9e=h0b41bf4_3 + - json-c=0.16=hc379101_0 + - jupyter_client=8.6.2=pyhd8ed1ab_0 + - jupyter_core=5.7.2=py311h38be061_0 + - jupyterlab_widgets=3.0.11=pyhd8ed1ab_0 + - kealib=1.5.0=ha7026e8_0 + - keyutils=1.6.1=h166bdaf_0 + - kiwisolver=1.4.5=py311h9547e67_1 + - krb5=1.20.1=h81ceb04_0 + - lame=3.100=h166bdaf_1003 + - lazy_loader=0.4=pyhd8ed1ab_0 + - lcms2=2.15=hfd0df8a_0 + - ld_impl_linux-64=2.40=hf3520f5_7 + - lerc=4.0.0=h27087fc_0 + - libacl=2.3.2=h0f662aa_0 + - libaec=1.1.3=h59595ed_0 + - libasprintf=0.22.5=h661eb56_2 + - libasprintf-devel=0.22.5=h661eb56_2 + - libblas=3.9.0=23_linux64_openblas + - libbrotlicommon=1.1.0=hd590300_1 + - libbrotlidec=1.1.0=hd590300_1 + - libbrotlienc=1.1.0=hd590300_1 + - libcap=2.67=he9d0100_0 + - libcblas=3.9.0=23_linux64_openblas + - libclang=15.0.7=default_h127d8a8_5 + - libclang13=15.0.7=default_h5d6823c_5 + - libcups=2.3.3=h36d4200_3 + - libcurl=8.1.2=h409715c_0 + - libdb=6.2.32=h9c3ff4c_0 + - libdeflate=1.17=h0b41bf4_0 + - libdrm=2.4.122=h4ab18f5_0 + - libedit=3.1.20191231=he28a2e2_2 + - libev=4.33=hd590300_2 + - libevent=2.1.10=h28343ad_4 + - libexpat=2.6.2=h59595ed_0 + - libffi=3.4.2=h7f98852_5 + - libflac=1.4.3=h59595ed_0 + - libgcc-ng=14.1.0=h77fa898_0 + - libgcrypt=1.11.0=h4ab18f5_1 + - libgdal=3.6.2=h6c674c2_9 + - libgettextpo=0.22.5=h59595ed_2 + - libgettextpo-devel=0.22.5=h59595ed_2 + - libgfortran-ng=14.1.0=h69a702a_0 + - libgfortran5=14.1.0=hc5f4f2c_0 + - libglib=2.78.1=hebfc3b9_0 + - libglu=9.0.0=he1b5a44_1001 + - libgomp=14.1.0=h77fa898_0 + - libgpg-error=1.50=h4f305b6_0 + - libhwloc=2.9.1=hd6dc26d_0 + - libiconv=1.17=hd590300_2 + - libidn2=2.3.7=hd590300_0 + - libkml=1.3.0=hbbc8833_1020 + - liblapack=3.9.0=23_linux64_openblas + - liblapacke=3.9.0=23_linux64_openblas + - libllvm15=15.0.7=hadd5161_1 + - libnetcdf=4.9.1=nompi_h34a3ff0_101 + - libnghttp2=1.58.0=h47da74e_0 + - libnsl=2.0.1=hd590300_0 + - libogg=1.3.5=h4ab18f5_0 + - libopenblas=0.3.27=pthreads_hac2b453_1 + - libopencv=4.6.0=py311ha52ee4f_9 + - libopus=1.3.1=h7f98852_1 + - libpciaccess=0.18=hd590300_0 + - libpng=1.6.43=h2797004_0 + - libpq=15.2=hb675445_0 + - libprotobuf=3.21.12=hfc55251_2 + - librttopo=1.1.0=ha49c73b_12 + - libsndfile=1.2.2=hc60ed4a_1 + - libsodium=1.0.18=h36c2ea0_1 + - libspatialindex=2.0.0=he02047a_0 + - libspatialite=5.0.1=h221c8f1_23 + - libsqlite=3.46.0=hde9e2c9_0 + - libssh2=1.11.0=h0841786_0 + - libstdcxx-ng=14.1.0=hc0a3c3a_0 + - libsystemd0=253=h8c4010b_1 + - libtasn1=4.19.0=h166bdaf_0 + - libtiff=4.5.0=h6adf6a1_2 + - libtool=2.4.7=h27087fc_0 + - libudev1=253=h0b41bf4_1 + - libunistring=0.9.10=h7f98852_0 + - libuuid=2.38.1=h0b41bf4_0 + - libva=2.17.0=h0b41bf4_0 + - libvorbis=1.3.7=h9c3ff4c_0 + - libvpx=1.11.0=h9c3ff4c_3 + - libwebp-base=1.4.0=hd590300_0 + - libxcb=1.13=h7f98852_1004 + - libxcrypt=4.4.36=hd590300_1 + - libxkbcommon=1.5.0=h79f4944_1 + - libxml2=2.10.3=hca2bb57_4 + - libxslt=1.1.37=h873f0b0_0 + - libzip=1.10.1=h2629f0a_3 + - libzlib=1.3.1=h4ab18f5_1 + - locket=1.0.0=pyhd8ed1ab_0 + - lxml=4.9.2=py311h14a6109_0 + - lz4=4.3.3=py311h38e4bf4_0 + - lz4-c=1.9.4=hcb278e6_0 + - mapclassify=2.7.0=pyhd8ed1ab_0 + - markdown-it-py=3.0.0=pyhd8ed1ab_0 + - markupsafe=2.1.5=py311h459d7ec_0 + - matplotlib=3.9.1=py311h38be061_1 + - matplotlib-base=3.9.1=py311h74b4f7c_1 + - matplotlib-inline=0.1.7=pyhd8ed1ab_0 + - mdurl=0.1.2=pyhd8ed1ab_0 + - metis=5.1.0=h59595ed_1007 + - mintpy=1.6.1=pyhd8ed1ab_0 + - mpfr=4.2.1=h38ae2d0_2 + - mpg123=1.32.6=h59595ed_0 + - msgpack-python=1.0.8=py311h52f7536_0 + - multimethod=1.9.1=pyhd8ed1ab_0 + - multiurl=0.3.1=pyhd8ed1ab_0 + - munch=4.0.0=pyhd8ed1ab_0 + - munkres=1.1.4=pyh9f0ad1d_0 + - mypy_extensions=1.0.0=pyha770c72_0 + - mysql-common=8.0.33=hf1915f5_6 + - mysql-libs=8.0.33=hca2cd23_6 + - ncurses=6.5=h59595ed_0 + - nest-asyncio=1.6.0=pyhd8ed1ab_0 + - netcdf4=1.6.3=nompi_py311ha396515_100 + - nettle=3.9.1=h7ab15ed_0 + - networkx=3.3=pyhd8ed1ab_1 + - nodeenv=1.9.1=pyhd8ed1ab_0 + - nspr=4.35=h27087fc_0 + - nss=3.103=h593d115_0 + - numpy=1.26.4=py311h64a7726_0 + - opencv=4.6.0=py311h38be061_9 + - openh264=2.3.1=hcb278e6_2 + - openjpeg=2.5.0=hfec8fc6_2 + - openmotif=2.3.8=h5d10074_3 + - openssl=3.1.6=h4ab18f5_0 + - p11-kit=0.24.1=hc5aa10d_0 + - packaging=24.1=pyhd8ed1ab_0 + - pandas=2.2.2=py311h14de704_1 + - pandera=0.20.3=hd8ed1ab_0 + - pandera-base=0.20.3=pyhd8ed1ab_0 + - parallel=20240722=ha770c72_0 + - parso=0.8.4=pyhd8ed1ab_0 + - partd=1.4.2=pyhd8ed1ab_0 + - pcre2=10.40=hc3806b6_0 + - perl=5.32.1=7_hd590300_perl5 + - pexpect=4.9.0=pyhd8ed1ab_0 + - pickleshare=0.7.5=py_1003 + - pillow=9.4.0=py311h50def17_1 + - pip=24.2=pyhd8ed1ab_0 + - pixman=0.43.2=h59595ed_0 + - platformdirs=4.2.2=pyhd8ed1ab_0 + - pluggy=1.5.0=pyhd8ed1ab_0 + - ply=3.11=pyhd8ed1ab_2 + - poppler=23.03.0=h091648b_0 + - poppler-data=0.4.12=hd8ed1ab_0 + - postgresql=15.2=h3248436_0 + - pre-commit=3.8.0=pyha770c72_0 + - proj=9.1.1=h8ffa02c_2 + - prompt-toolkit=3.0.47=pyha770c72_0 + - psutil=6.0.0=py311h331c9d8_0 + - pthread-stubs=0.4=h36c2ea0_1001 + - ptyprocess=0.7.0=pyhd3deb0d_0 + - pulseaudio=16.1=hcb278e6_3 + - pulseaudio-client=16.1=h5195f5e_3 + - pulseaudio-daemon=16.1=ha8d29e2_3 + - pure_eval=0.2.3=pyhd8ed1ab_0 + - pv=1.6.6=h470a237_0 + - py-opencv=4.6.0=py311h781c19f_9 + - pyaps3=0.3.4=pyhd8ed1ab_1 + - pycparser=2.22=pyhd8ed1ab_0 + - pydantic=2.8.2=pyhd8ed1ab_0 + - pydantic-core=2.20.1=py311hb3a8bbb_0 + - pygments=2.18.0=pyhd8ed1ab_0 + - pygrib=2.1.4=py311h0acc61a_6 + - pykdtree=1.3.12=py311h18e1886_1 + - pykml=0.2.0=pyhd8ed1ab_1 + - pyparsing=3.1.2=pyhd8ed1ab_0 + - pyproj=3.5.0=py311h945b3ca_0 + - pyqt=5.15.9=py311hf0fb5b6_5 + - pyqt5-sip=12.12.2=py311hb755f60_5 + - pyresample=1.29.0=py311h044e617_0 + - pyrocko=2024.01.10=py311h03063b4_0 + - pyshp=2.3.1=pyhd8ed1ab_0 + - pysocks=1.7.1=pyha2e5f31_6 + - pysolid=0.3.3=py311h1b718ac_2 + - pytest=8.3.2=pyhd8ed1ab_0 + - python=3.11.6=hab00c5b_0_cpython + - python-dateutil=2.9.0=pyhd8ed1ab_0 + - python-tzdata=2024.1=pyhd8ed1ab_0 + - python_abi=3.11=4_cp311 + - pytz=2024.1=pyhd8ed1ab_0 + - pywavelets=1.6.0=py311h18e1886_0 + - pyyaml=6.0.1=py311h459d7ec_1 + - pyzmq=26.0.3=py311h08a0b41_0 + - qhull=2020.2=h434a139_5 + - qt-main=5.15.8=h5d23da1_6 + - rasterio=1.3.6=py311h567e639_0 + - readline=8.2=h8228510_1 + - regex=2024.7.24=py311h61187de_0 + - remotezip=0.12.3=pyhd8ed1ab_0 + - requests=2.32.3=pyhd8ed1ab_0 + - rich=13.7.1=pyhd8ed1ab_0 + - rioxarray=0.17.0=pyhd8ed1ab_0 + - rtree=1.3.0=py311h51bcefd_1 + - s3transfer=0.10.2=pyhd8ed1ab_0 + - sardem=0.11.3=pyhd8ed1ab_0 + - scikit-image=0.20.0=py311h2872171_1 + - scikit-learn=1.5.1=py311hd632256_0 + - scipy=1.14.0=py311h517d4fd_1 + - setuptools=72.1.0=pyhd8ed1ab_0 + - shapely=2.0.1=py311h0f577a2_0 + - sip=6.7.12=py311hb755f60_0 + - six=1.16.0=pyh6c4a22f_0 + - snappy=1.2.1=ha2e4443_0 + - snuggs=1.4.7=pyhd8ed1ab_1 + - sortedcontainers=2.4.0=pyhd8ed1ab_0 + - sqlite=3.46.0=h6d4b2fc_0 + - stack_data=0.6.2=pyhd8ed1ab_0 + - suitesparse=5.10.1=h9e50725_1 + - svt-av1=1.4.1=hcb278e6_0 + - tbb=2021.9.0=hf52228f_0 + - tblib=3.0.0=pyhd8ed1ab_0 + - tenacity=8.2.2=pyhd8ed1ab_0 + - threadpoolctl=3.5.0=pyhc1e730c_0 + - tifffile=2020.6.3=py_0 + - tile_mate=0.0.11=pyhd8ed1ab_0 + - tiledb=2.13.2=hd532e3d_0 + - tk=8.6.13=noxft_h4845f30_101 + - toml=0.10.2=pyhd8ed1ab_0 + - tomli=2.0.1=pyhd8ed1ab_0 + - toolz=0.12.1=pyhd8ed1ab_0 + - tornado=6.4.1=py311h331c9d8_0 + - tqdm=4.66.4=pyhd8ed1ab_0 + - traitlets=5.14.3=pyhd8ed1ab_0 + - typeguard=4.3.0=pyhd8ed1ab_1 + - typing-extensions=4.12.2=hd8ed1ab_0 + - typing_extensions=4.12.2=pyha770c72_0 + - typing_inspect=0.9.0=pyhd8ed1ab_0 + - tzcode=2024a=h3f72095_0 + - tzdata=2024a=h0c530f3_0 + - tzlocal=5.2=py311h38be061_0 + - ukkonen=1.0.1=py311h9547e67_4 + - uriparser=0.9.8=hac33072_0 + - urllib3=2.2.2=pyhd8ed1ab_1 + - utm=0.7.0=pyhd8ed1ab_0 + - virtualenv=20.26.3=pyhd8ed1ab_0 + - wcwidth=0.2.13=pyhd8ed1ab_0 + - wheel=0.43.0=pyhd8ed1ab_1 + - widgetsnbextension=4.0.11=pyhd8ed1ab_0 + - wrapt=1.16.0=py311h459d7ec_0 + - x264=1!164.3095=h166bdaf_2 + - x265=3.5=h924138e_3 + - xarray=2024.3.0=pyhd8ed1ab_0 + - xcb-util=0.4.0=h516909a_0 + - xcb-util-image=0.4.0=h166bdaf_0 + - xcb-util-keysyms=0.4.0=h516909a_0 + - xcb-util-renderutil=0.3.9=h166bdaf_0 + - xcb-util-wm=0.4.1=h516909a_0 + - xerces-c=3.2.4=h55805fa_1 + - xkeyboard-config=2.38=h0b41bf4_0 + - xorg-fixesproto=5.0=h7f98852_1002 + - xorg-inputproto=2.3.2=h7f98852_1002 + - xorg-kbproto=1.0.7=h7f98852_1002 + - xorg-libice=1.0.10=h7f98852_0 + - xorg-libsm=1.2.3=hd9c2040_1000 + - xorg-libx11=1.6.12=h36c2ea0_0 + - xorg-libxau=1.0.11=hd590300_0 + - xorg-libxdmcp=1.1.3=h7f98852_0 + - xorg-libxext=1.3.4=h516909a_0 + - xorg-libxfixes=5.0.3=h516909a_1004 + - xorg-libxft=2.3.4=hc534e41_1 + - xorg-libxi=1.7.10=h516909a_0 + - xorg-libxmu=1.1.3=h516909a_0 + - xorg-libxp=1.0.3=hd590300_1003 + - xorg-libxrender=0.9.10=h516909a_1002 + - xorg-libxt=1.1.5=h516909a_1003 + - xorg-renderproto=0.11.1=h7f98852_1002 + - xorg-xextproto=7.3.0=h0b41bf4_1003 + - xorg-xproto=7.0.31=h7f98852_1007 + - xyzservices=2024.6.0=pyhd8ed1ab_0 + - xz=5.2.6=h166bdaf_0 + - yaml=0.2.5=h7f98852_2 + - zeromq=4.3.5=h59595ed_1 + - zict=3.0.0=pyhd8ed1ab_0 + - zipp=3.19.2=pyhd8ed1ab_0 + - zlib=1.3.1=h4ab18f5_1 + - zstandard=0.23.0=py311h5cd10c7_0 + - zstd=1.5.6=ha6fb4c9_0 + - pip: + - geojson==3.1.0 + - kite==1.5.8 + - okada-wrapper==24.6.15 + - pyqtgraph==0.13.7 + - url-widget==0.0.0 diff --git a/images/helloworld/Dockerfile b/images/helloworld/Dockerfile deleted file mode 100644 index fccf654..0000000 --- a/images/helloworld/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ - -# hadolint ignore=DL3007 -FROM hello-world:latest as release - - -########################################## - -FROM release as testing diff --git a/images/helloworld/build.sh b/images/helloworld/build.sh deleted file mode 100644 index ffc37bd..0000000 --- a/images/helloworld/build.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -ex - -cp Dockerfile dockerfile.build - -BUILD_TAG=$(date +"%F-%H-%M-%S") -COMMIT_HEAD=$(git rev-parse --short HEAD) - -IMAGE_NAME=$1 - -time docker build -f dockerfile.build --target testing . -time docker build -f dockerfile.build \ - -t "$DOCKER_REGISTRY"/"$IMAGE_NAME":"$BUILD_TAG" \ - -t "$DOCKER_REGISTRY"/"$IMAGE_NAME":latest \ - -t "$DOCKER_REGISTRY"/"$IMAGE_NAME":"$COMMIT_HEAD" \ - --target release . - -# Push to registry -docker push "$DOCKER_REGISTRY"/"$IMAGE_NAME":"$BUILD_TAG" -docker push "$DOCKER_REGISTRY"/"$IMAGE_NAME":latest -docker push "$DOCKER_REGISTRY"/"$IMAGE_NAME":"$COMMIT_HEAD" diff --git a/images/opera/Dockerfile b/images/opera/Dockerfile deleted file mode 100644 index 8c39577..0000000 --- a/images/opera/Dockerfile +++ /dev/null @@ -1,192 +0,0 @@ -FROM jupyter/base-notebook:lab-4.0.7 as release - -# Base Stage **************************************************************** -USER root -WORKDIR / - -RUN set -ve - -COPY pkgs/vnc_patches/vnc.patch /tmp/vnc.patch - -# ignore DL3009 since deleting apt-get lists makes later installs fail -# hadolint ignore=DL3009 -RUN apt-get update - -# ignore DL3008 because pinning is not desired -# ignore DL3009 since deleting apt-get lists makes later installs fail -# hadolint ignore=DL3008,DL3009 -RUN apt-get install --no-install-recommends -y \ - software-properties-common \ - git && \ - apt-get install --no-install-recommends -y gpg-agent && \ - add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable && \ - apt-get update && \ - apt-get upgrade -y - -# ignore DL3008 because pinning is not desired -# hadolint ignore=DL3008 -RUN apt-get install --no-install-recommends --fix-missing -y \ - ### GENERAL - zip \ - unzip \ - wget \ - vim \ - rsync \ - less \ - snaphu \ - curl \ - openssh-client \ - libgl1-mesa-glx \ - emacs \ - gnupg2 \ - jq \ - gfortran \ - make \ - proj-bin \ - geotiff-bin \ - libshp-dev \ - libshp2 \ - libhdf5-dev \ - libnetcdf-dev \ - libgdal-dev \ - libgsl-dev \ - gdal-bin \ - ### SNAP - default-jdk-headless \ - ### Install texlive for PDF exporting of notebooks containing LaTex - texlive-xetex \ - texlive-fonts-recommended \ - texlive-plain-generic \ - ### PyGMTSAR - csh \ - autoconf \ - make \ - libtiff5-dev \ - liblapack-dev \ - libgmt-dev \ - gmt-dcw \ - gmt-gshhg \ - gmt \ - ### Jupyter Desktop -## patch \ -## dbus-x11 \ -## xfce4 \ -## xfce4-panel \ -## xfce4-session \ -## xfce4-settings \ -## xorg \ -## xubuntu-icon-theme \ -## tigervnc-standalone-server \ -## tigervnc-xorg-extension \ - -- - -# Update conda and mamba: this breaks things in the hook, need to play with it more -# Updating just conda and mamba will auto-remove pip, so force pip to update to remain -#RUN mamba update -c conda-forge -y conda mamba pip - -# ignore DL3059 to make the two codeblocks distinct -# hadolint ignore=DL3059 -RUN mamba install -c conda-forge -y \ - ### Install plotting and general - awscli \ - boto3 \ - pyyaml \ - bokeh \ - plotly \ - 'pyopenssl>=23.0.0' \ - zstd==1.5.5 \ - zstandard==0.21.0 \ - ### Install jupyter libaries - kernda \ - jupyter-resource-usage \ - nb_conda_kernels \ - jupyterlab-spellchecker \ - ipympl \ - jupyterlab_widgets \ - ipywidgets \ - #jupyter-ai \ - jupyterlab-git \ - panel \ - ### Dask - dask-gateway \ - dask \ - distributed \ - ### Jupyter Desktop -## websockify \ - -- - -# Install python packages -# ignore DL3059 to make the two codeblocks distinct -# ignore DL3013 since pinning packages is not desired -# hadolint ignore=DL3013,DL3059 -RUN python3 -m pip install --no-cache-dir \ - ### For ASF - url-widget \ - opensarlab-frontend==1.5.1 \ - jupyterlab-jupyterbook-navigation==0.1.4 \ - ### For pyGMTSAR - pygmtsar -WORKDIR / -RUN mkdir -p /tmp/build/GMTSAR /usr/local/GMTSAR &&\ - git clone --branch master https://github.com/gmtsar/gmtsar /tmp/build/GMTSAR/ -WORKDIR /tmp/build/GMTSAR -RUN autoconf &&\ - ./configure --with-orbits-dir=/tmp CFLAGS='-z muldefs' LDFLAGS='-z muldefs' &&\ - make &&\ - make install &&\ - mv -v /tmp/build/GMTSAR/bin /usr/local/GMTSAR/bin &&\ - rm -rf /tmp/build -WORKDIR / -RUN \ - ### Jupyter Desktop - # When running a local version of this dockerfile, consult https://github.com/jupyterhub/jupyter-remote-desktop-proxy/issues/47#issuecomment-1687484891 -## cd / &&\ -## git clone https://github.com/jupyterhub/jupyter-remote-desktop-proxy.git /opt/install &&\ -## mv /tmp/vnc.patch /opt/install/vnc.patch &&\ -## cd /opt/install &&\ -## # Due to breaking updates, for now try to find an older working commit -## git checkout 8d1342d9c93803c5f9c3b820dbbcaa55d3b91e01 &&\ -## mamba env update -n base --file environment.yml &&\ -## patch -p1 < vnc.patch &&\ -## cd / &&\ - ### Extra stuff - # Make sure that any files in the home directory are jovyan permission - chown -R jovyan:users "$HOME/" &&\ - # Make sure mamba (within conda) has write access - chmod -R 777 /opt/conda/pkgs/ &&\ - # Make sure JupyterLab settings is writable - mkdir -p /opt/conda/share/jupyter/lab/settings/ &&\ - chown jovyan:users /opt/conda/share/jupyter/lab/settings/ &&\ - chmod -R 775 /opt/conda/share/jupyter/lab/settings/ &&\ - # Add sudo group user 599 elevation - addgroup -gid 599 elevation &&\ - echo '%elevation ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers &&\ - # Use the kernel display name `base` for the base conda environment - mamba run -n base kernda --display-name base -o /opt/conda/share/jupyter/kernels/python3/kernel.json &&\ - mamba clean -y --all &&\ - mamba init &&\ - rm -rf /home/jovyan/..?* /home/jovyan/.[!.]* /home/jovyan/* - -# Create opera environment and register kernel -COPY environment/environment.yaml /tmp/environment.yaml - -RUN mamba env create -f /tmp/environment.yaml &&\ - /opt/conda/envs/opera/bin/python -m ipykernel install --prefix /opt/conda/envs/opera --name opera --display-name "opera" &&\ - rm -rf /opt/conda/pkgs/cache &&\ - conda env config vars set -n opera GDAL_HTTP_COOKIEFILE=/tmp/cookies.txt &&\ - conda env config vars set -n opera GDAL_HTTP_COOKIEJAR=/tmp/cookies.txt &&\ - conda env config vars set -n opera VSI_CACHE=YES - -### GMTSAR -ENV PATH=/usr/local/GMTSAR/bin:$PATH - -WORKDIR /home/jovyan -USER jovyan - -########################################## - -FROM release as testing - -COPY tests/* /tests/ - -RUN bash /tests/*.sh diff --git a/images/opera/environment/environment.yaml b/images/opera/environment/environment.yaml deleted file mode 100644 index 941ab11..0000000 --- a/images/opera/environment/environment.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -name: opera -channels: - - conda-forge -dependencies: - - bokeh=2.4.3 - - boto3 - - gdal>=3.6.2 - - geopandas=0.10.2 - - geoviews=1.9.5 - - geoviews-core=1.9.5 - - earthaccess - - folium - - fsspec - - h5py - - holoviews=1.14.9 - - hvplot=0.8.0 - - imageio=2.31.1 - - ipykernel=6.15.0 - - ipyleaflet - - ipython - - ipympl - - jupyterlab==3.4.3 - - jupyterlab_server==2.14.0 - - leafmap>=0.30 - - localtileserver - - lxml - - matplotlib - - nodejs=18.16.1 - - notebook=6.4.12 - - numba=0.55.1 - - numpy=1.21.6 - - panel=0.13.1 - - pip - - pystac-client==0.5.1 - - python>=3.10 - - rasterstats - - requests - - rasterio>=1.2.6 - - rioxarray - - scikit-image - - selenium - - s3fs>=2021.8.0 - - xarray=0.20.2 - - pip: - - gdal-utils diff --git a/images/opera/pkgs/vnc_patches/vnc.patch b/images/opera/pkgs/vnc_patches/vnc.patch deleted file mode 100644 index e8baae0..0000000 --- a/images/opera/pkgs/vnc_patches/vnc.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff --git a/jupyter_remote_desktop_proxy/__init__.py b/jupyter_remote_desktop_proxy/__init__.py -index bb635e8..6085262 100644 ---- a/jupyter_remote_desktop_proxy/__init__.py -+++ b/jupyter_remote_desktop_proxy/__init__.py -@@ -39,7 +39,7 @@ def setup_desktop(): - + [ - '-verbose', - '-geometry', -- '1680x1050', -+ '2000x1200', - '-SecurityTypes', - 'None', - '-fg', -diff --git a/jupyter_remote_desktop_proxy/share/web/noVNC-1.2.0/vnc_lite.html b/jupyter_remote_desktop_proxy/share/web/noVNC-1.2.0/vnc_lite.html -index 14a0313..c240a34 100644 ---- a/jupyter_remote_desktop_proxy/share/web/noVNC-1.2.0/vnc_lite.html -+++ b/jupyter_remote_desktop_proxy/share/web/noVNC-1.2.0/vnc_lite.html -@@ -47,7 +47,15 @@ - #status { - text-align: center; - } -- #sendCtrlAltDelButton { -+ #jupyterLabPageButton { -+ position: fixed; -+ top: 0px; -+ right: 150px; -+ border: 1px outset; -+ padding: 5px 5px 4px 5px; -+ cursor: pointer; -+ } -+ #serverStartStopPageButton { - position: fixed; - top: 0px; - right: 0px; -@@ -135,14 +143,33 @@ - desktopName = e.detail.name; - } - -- // Since most operating systems will catch Ctrl+Alt+Del -- // before they get a chance to be intercepted by the browser, -- // we provide a way to emulate this key sequence. -- function sendCtrlAltDel() { -- rfb.sendCtrlAltDel(); -+ // Go to JupyterHub's home page -+ // If this does nto exist, it will give a 404 -+ function jupyterLabPage() { -+ const lab_path = window.location.href.replace('desktop', 'lab') -+ window.location.replace(lab_path); - return false; - } - -+ document.getElementById('jupyterLabPageButton') -+ .onclick = jupyterLabPage; -+ -+ // Go to server start/stop -+ function serverStartStopPage() { -+ const url = window.location.href -+ const regex = /\/lab\/(.*)\/user/ -+ const found = url.match(regex); -+ -+ const lab_name = found[1] -+ if (lab_name) { -+ window.location.href = "/lab/" + lab_name + "/hub/home"; -+ } -+ return false; -+ } -+ -+ document.getElementById('serverStartStopPageButton') -+ .onclick = serverStartStopPage; -+ - // Show a status text in the top bar - function status(text) { - document.getElementById('status').textContent = text; -@@ -168,9 +195,6 @@ - return defaultValue; - } - -- document.getElementById('sendCtrlAltDelButton') -- .onclick = sendCtrlAltDel; -- - // Read parameters specified in the URL query string - // By default, use the host and port of server that served this file - const host = readQueryVariable('host', window.location.hostname); -@@ -249,7 +273,8 @@ - - - --
Send CtrlAltDel
-+
Go to JupyterLab
-+
Stop Server and Logout
- -
- diff --git a/images/sar/.gitignore b/images/sar/.gitignore deleted file mode 100644 index 1584f2f..0000000 --- a/images/sar/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -** -!.gitignore -!build.sh -!Dockerfile -!download.sh -!pkgs -!pkgs/** -!configs -!configs/** diff --git a/images/sar/build.sh b/images/sar/build.sh deleted file mode 100644 index fee8371..0000000 --- a/images/sar/build.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -set -ex - -[ -e download.sh ] && bash download.sh - -cp Dockerfile dockerfile.build - -SED_STR="s|--from=(.*):|--from=$DOCKER_REGISTRY/\1:latest|g" -sed -i -r "$SED_STR" dockerfile.build - -mkdir -p tests -cp -r ../../tests/* tests/ - -BUILD_TAG=$(date +"%F-%H-%M-%S") -COMMIT_HEAD=$(git rev-parse --short HEAD) - -IMAGE_NAME="$1" - -time docker build -f dockerfile.build --target testing . -time docker build -f dockerfile.build \ - -t "$DOCKER_REGISTRY/$IMAGE_NAME:$BUILD_TAG" \ - -t "$DOCKER_REGISTRY/$IMAGE_NAME:latest" \ - -t "$DOCKER_REGISTRY/$IMAGE_NAME:$COMMIT_HEAD" \ - --target release . - -# Push to registry -docker push "$DOCKER_REGISTRY/$IMAGE_NAME:$BUILD_TAG" -docker push "$DOCKER_REGISTRY/$IMAGE_NAME:latest" -docker push "$DOCKER_REGISTRY/$IMAGE_NAME:$COMMIT_HEAD" diff --git a/images/sar/download.sh b/images/sar/download.sh deleted file mode 100644 index 2005ff9..0000000 --- a/images/sar/download.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -set -e diff --git a/images/sardesktop/.gitignore b/images/sardesktop/.gitignore deleted file mode 100644 index 1584f2f..0000000 --- a/images/sardesktop/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -** -!.gitignore -!build.sh -!Dockerfile -!download.sh -!pkgs -!pkgs/** -!configs -!configs/** diff --git a/images/sardesktop/Dockerfile b/images/sardesktop/Dockerfile deleted file mode 100644 index dc5a33e..0000000 --- a/images/sardesktop/Dockerfile +++ /dev/null @@ -1,202 +0,0 @@ -FROM jupyter/base-notebook:lab-4.0.7 as release - -# Base Stage **************************************************************** -USER root -WORKDIR / - -RUN set -ve - -# ignore DL3008 because pinning is not desired -# ignore DL3059 because combining the two RUN statements fail -# ignore DL3009 since deleting apt-get lists makes later installs fail -# hadolint ignore=DL3008,DL3059,DL3009 -RUN apt-get update -# ignore DL3008 because pinning is not desired -# ignore DL3009 since deleting apt-get lists makes later installs fail -# hadolint ignore=DL3008,DL3009 -RUN apt-get install --no-install-recommends -y \ - software-properties-common \ - git && \ - apt-get install --no-install-recommends -y gpg-agent && \ - add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable && \ - apt-get update && \ - apt-get upgrade -y - -# ignore DL3008 because pinning is not desired -# hadolint ignore=DL3008 -RUN apt-get install --no-install-recommends --fix-missing -y \ - ### GENERAL - zip \ - unzip \ - wget \ - vim \ - rsync \ - less \ - snaphu \ - curl \ - openssh-client \ - libgl1-mesa-glx \ - emacs \ - gnupg2 \ - jq \ - gfortran \ - make \ - proj-bin \ - geotiff-bin \ - libshp-dev \ - libshp2 \ - libhdf5-dev \ - libnetcdf-dev \ - libgdal-dev \ - libgsl-dev \ - gdal-bin \ - ### SNAP - default-jdk-headless \ - ### Install texlive for PDF exporting of notebooks containing LaTex - texlive-xetex \ - texlive-fonts-recommended \ - texlive-plain-generic \ - ### PyGMTSAR - csh \ - autoconf \ - make \ - libtiff5-dev \ - liblapack-dev \ - libgmt-dev \ - gmt-dcw \ - gmt-gshhg \ - gmt \ - -- - -# Update conda and mamba: this breaks things in the hook, need to play with it more -# Updating just conda and mamba will auto-remove pip, so force pip to update to remain -#RUN mamba update -c conda-forge -y conda mamba pip - -# ignore DL3059 to make the two codeblocks distinct -# hadolint ignore=DL3059 -RUN mamba install -c conda-forge -y \ - ### Install plotting and general - awscli \ - boto3 \ - pyyaml \ - bokeh \ - plotly \ - 'pyopenssl>=23.0.0' \ - zstd==1.5.5 \ - zstandard==0.21.0 \ - ### Install jupyter libaries - kernda \ - jupyter-resource-usage \ - nb_conda_kernels \ - jupyterlab-spellchecker \ - ipympl \ - jupyterlab_widgets \ - ipywidgets \ - #jupyter-ai \ - jupyterlab-git \ - panel \ - ### Dask - dask-gateway \ - dask \ - distributed \ - -- - -# ignore DL3059 to make the two codeblocks distinct -# ignore DL3013 since pinning packages is not desired -# hadolint ignore=DL3059,DL3013 -RUN python3 -m pip install --no-cache-dir \ - ### For ASF - url-widget \ - opensarlab-frontend==1.5.1 \ - jupyterlab-jupyterbook-navigation==0.2.0 \ - jupyterlab_myst \ - ### For pyGMTSAR - pygmtsar -WORKDIR / -RUN mkdir -p /tmp/build/GMTSAR /usr/local/GMTSAR &&\ - git clone --branch master https://github.com/gmtsar/gmtsar /tmp/build/GMTSAR/ -WORKDIR /tmp/build/GMTSAR &&\ - autoconf &&\ - ./configure --with-orbits-dir=/tmp CFLAGS='-z muldefs' LDFLAGS='-z muldefs' &&\ - make &&\ - make install &&\ - mv -v /tmp/build/GMTSAR/bin /usr/local/GMTSAR/bin &&\ - rm -rf /tmp/build -WORKDIR / - ### Extra stuff - # Make sure that any files in the home directory are jovyan permission -RUN chown -R jovyan:users "$HOME/" &&\ - # Make sure mamba (within conda) has write access - chmod -R 777 /opt/conda/pkgs/ &&\ - # Make sure JupyterLab settings is writable - mkdir -p /opt/conda/share/jupyter/lab/settings/ &&\ - chown jovyan:users /opt/conda/share/jupyter/lab/settings/ &&\ - chmod -R 775 /opt/conda/share/jupyter/lab/settings/ &&\ - # Add sudo group user 599 elevation - addgroup -gid 599 elevation &&\ - echo '%elevation ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers &&\ - # Use the kernel display name `base` for the base conda environment - mamba run -n base kernda --display-name base -o /opt/conda/share/jupyter/kernels/python3/kernel.json &&\ - mamba clean -y --all &&\ - mamba init &&\ - rm -rf /home/jovyan/..?* /home/jovyan/.[!.]* /home/jovyan/* - -### GMTSAR -ENV PATH=/usr/local/GMTSAR/bin:$PATH - -###### -# Virtual Desktop -# ignore DL3013 since pinning packages is not desired -# hadolint ignore=DL3013 -RUN python3 -m pip install --no-cache-dir jupyter-remote-desktop-proxy &&\ - mamba install -c conda-forge -y websockify - -# ignore DL3008 because pinning is not desired -# hadolint ignore=DL3008 -RUN apt-get install --no-install-recommends --fix-missing -y \ - dbus-x11 \ - xfce4 \ - xfce4-panel \ - xfce4-session \ - xfce4-settings \ - xorg \ - xubuntu-icon-theme \ - tigervnc-standalone-server \ - tigervnc-xorg-extension \ - -- - -# Replace Hub Control button with something more suited for an OSL lab -# ignore DL3059 to make the two codeblocks distinct -# hadolint ignore=DL3059 -RUN sed -i \ - -e 's|if hub_control_panel_url|if LAB_SHORT_NAME|' \ - -e 's|{{ hub_control_panel_url }}|/lab/{{ LAB_SHORT_NAME }}/hub/home|' \ - -e 's|Hub Control Panel|Shutdown and Logout Page|' \ - /opt/conda/lib/python3.11/site-packages/jupyter_remote_desktop_proxy/templates/index.html - -# ignore DL3059 to make the two codeblocks distinct -# hadolint ignore=DL3059 -RUN sed -i \ - -e 's|cd |sleep 1 \&\& cd |' \ - /opt/conda/lib/python3.11/site-packages/jupyter_remote_desktop_proxy/share/xstartup - -# Install Browser -COPY configs/mozilla-firefox.pref /etc/apt/preferences.d/mozilla-firefox -# ignore DL3008 because pinning is not desired -# hadolint ignore=DL3008 -RUN add-apt-repository ppa:mozillateam/ppa &&\ - apt-get install -y --no-install-recommends firefox -# -# END Virtual Desktop -#### - -WORKDIR /home/jovyan -USER jovyan - -########################################## - -FROM release as testing - -COPY tests/* /tests/ - -RUN bash /tests/*.sh diff --git a/images/sardesktop/build.sh b/images/sardesktop/build.sh deleted file mode 100644 index fee8371..0000000 --- a/images/sardesktop/build.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -set -ex - -[ -e download.sh ] && bash download.sh - -cp Dockerfile dockerfile.build - -SED_STR="s|--from=(.*):|--from=$DOCKER_REGISTRY/\1:latest|g" -sed -i -r "$SED_STR" dockerfile.build - -mkdir -p tests -cp -r ../../tests/* tests/ - -BUILD_TAG=$(date +"%F-%H-%M-%S") -COMMIT_HEAD=$(git rev-parse --short HEAD) - -IMAGE_NAME="$1" - -time docker build -f dockerfile.build --target testing . -time docker build -f dockerfile.build \ - -t "$DOCKER_REGISTRY/$IMAGE_NAME:$BUILD_TAG" \ - -t "$DOCKER_REGISTRY/$IMAGE_NAME:latest" \ - -t "$DOCKER_REGISTRY/$IMAGE_NAME:$COMMIT_HEAD" \ - --target release . - -# Push to registry -docker push "$DOCKER_REGISTRY/$IMAGE_NAME:$BUILD_TAG" -docker push "$DOCKER_REGISTRY/$IMAGE_NAME:latest" -docker push "$DOCKER_REGISTRY/$IMAGE_NAME:$COMMIT_HEAD" diff --git a/images/sardesktop/configs/mozilla-firefox.pref b/images/sardesktop/configs/mozilla-firefox.pref deleted file mode 100644 index 44a28d9..0000000 --- a/images/sardesktop/configs/mozilla-firefox.pref +++ /dev/null @@ -1,7 +0,0 @@ -Package: * -Pin: release o=LP-PPA-mozillateam -Pin-Priority: 1001 - -Package: firefox -Pin: version 1:1snap* -Pin-Priority: -1 diff --git a/images/sardesktop/download.sh b/images/sardesktop/download.sh deleted file mode 100644 index 2005ff9..0000000 --- a/images/sardesktop/download.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -set -e diff --git a/tests/sar.sh b/tests/sar.sh index 181e979..1d90383 100644 --- a/tests/sar.sh +++ b/tests/sar.sh @@ -3,5 +3,4 @@ set -ex # The idiom "&& [ $? -gt 2 ] && true" ignores warnings from the previous command -python --version -python3.10 --version +echo "Hello World in tests"