Skip to content

Commit

Permalink
Merge pull request #54 from nmfs-opensci/eeholmes-patch-2
Browse files Browse the repository at this point in the history
edit test
  • Loading branch information
eeholmes authored Nov 5, 2024
2 parents 8e92cfb + df47799 commit 10dd452
Show file tree
Hide file tree
Showing 11 changed files with 283 additions and 10 deletions.
11 changes: 11 additions & 0 deletions draft_images/test/Desktop/cdat.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
Name=CWUtils
GenericName=CoastWatch Data Analysis Tool
Icon=cdat
TryExec=cdat
Exec=cdat %F
Terminal=false
StartupNotify=false
Categories=Qt;Education;Science;Geography;
Keywords=map;globe;
Binary file added draft_images/test/Desktop/cdat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions draft_images/test/Desktop/panoply.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Type=Application
Name=Panoply
GenericName=Panoply netCDF, HDF and GRIB Data Viewer
Icon=panoply
Exec=/tmp/PanoplyJ/panoply.sh %F
Terminal=false
StartupNotify=false
Categories=Qt;Education;Science;Geography;
Keywords=map;
Binary file added draft_images/test/Desktop/panoply.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions draft_images/test/Desktop/qgis.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# From: https://github.com/qgis/QGIS/blob/ltr-3_28/linux/org.qgis.qgis.desktop.in
[Desktop Entry]
Type=Application
Name=QGIS Desktop
GenericName=Geographic Information System
Icon=/srv/conda/envs/notebook/share/qgis/images/icons/qgis-icon-512x512.png
TryExec=qgis
Exec=qgis %F
Terminal=false
StartupNotify=false
Categories=Qt;Education;Science;Geography;
MimeType=application/x-qgis-project;application/x-qgis-project-container;application/x-qgis-layer-settings;application/x-qgis-layer-definition;application/x-qgis-composer-template;image/tiff;image/jpeg;image/jp2;application/x-raster-aig;application/x-raster-ecw;application/x-raster-mrsid;application/x-mapinfo-mif;application/x-esri-shape;application/vnd.google-earth.kml+xml;application/vnd.google-earth.kmz;application/geopackage+sqlite3;
Keywords=map;globe;postgis;wms;wfs;ogc;osgeo;
StartupWMClass=QGIS3
212 changes: 212 additions & 0 deletions draft_images/test/Desktop/qgis.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
<?xml version="1.0"?>
<!-- From: https://raw.githubusercontent.com/qgis/QGIS/ltr-3_28/debian/qgis.xml -->
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>

<mime-type type="application/x-qgis-project">
<comment>QGIS Project</comment>
<comment xml:lang="de">QGIS-Projekt</comment>
<sub-class-of type="application/xml"/>
<alias type="application/x-qgis"/>
<icon name="qgis-qgs"/>
<magic priority="50">
<match type="string" offset="0" value="&lt;!DOCTYPE qgis"/>
</magic>
<glob pattern="*.qgs"/>
</mime-type>

<mime-type type="application/x-qgis-project-container">
<comment>QGIS Project</comment>
<comment xml:lang="de">QGIS-Projekt</comment>
<sub-class-of type="application/zip"/>
<alias type="application/x-qgis"/>
<icon name="qgis-qgs"/>
<glob pattern="*.qgz"/>
</mime-type>

<mime-type type="application/x-qgis-layer-settings">
<comment>QGIS layer settings</comment>
<comment xml:lang="de">QGIS-Layereinstellungen</comment>
<sub-class-of type="application/xml"/>
<icon name="qgis-qml"/>
<magic priority="80">
<match type="string" offset="0" value="&lt;!DOCTYPE qgis"/>
</magic>
<glob pattern="*.qml"/>
</mime-type>

<mime-type type="application/x-qgis-layer-definition">
<comment>QGIS layer definition</comment>
<comment xml:lang="de">QGIS-Layerdefinition</comment>
<sub-class-of type="application/xml"/>
<icon name="qgis-qlr"/>
<magic priority="50">
<match type="string" offset="0" value="&lt;!DOCTYPE qgis-layer-definition"/>
</magic>
<glob pattern="*.qlr"/>
</mime-type>

<mime-type type="application/x-qgis-composer-template">
<comment>QGIS composer template</comment>
<comment xml:lang="de">QGIS-Druckzusammenstellungsvorlage</comment>
<sub-class-of type="application/xml"/>
<icon name="qgis-qpt"/>
<magic priority="50">
<match type="string" offset="0" value="&lt;!DOCTYPE qgis"/>
</magic>
<glob pattern="*.qpt"/>
</mime-type>

<mime-type type="application/x-esri-shape">
<comment>ESRI shape file</comment>
<comment xml:lang="de">ESRI-Shapedatei</comment>
<icon name="qgis-mime"/>
<magic priority="100">
<match type="big32" offset="0" value="9994">
<match type="big32" offset="4" value="0">
<match type="big32" offset="8" value="0">
<match type="big32" offset="12" value="0">
<match type="big32" offset="16" value="0">
<match type="big32" offset="20" value="0">
<match type="big32" offset="28" value="1000"/>
</match>
</match>
</match>
</match>
</match>
</match>
</magic>
<glob pattern="*.shp"/>
<glob pattern="*.shx"/>
</mime-type>

<mime-type type="application/x-esri-crs">
<comment>ESRI coordinate reference system</comment>
<comment xml:lang="de">ESRI-Koordinatenreferenzsystem</comment>
<icon name="qgis-mime"/>
<magic>
<match type="string" offset="0" value="GEOGCS["/>
<match type="string" offset="0" value="PROJCS["/>
<match type="string" offset="0" value="LOCAL_CS["/>
</magic>
<glob pattern="*.prj"/>
</mime-type>

<mime-type type="image/tiff">
<comment>TIFF raster data</comment>
<comment xml:lang="de">TIFF-Rasterdaten</comment>
<icon name="qgis-mime"/>
<magic priority="50">
<match type="string" offset="0" value="MM">
<match type="little16" offset="2" value="42"/>
</match>
<match type="string" offset="0" value="MM">
<match type="big16" offset="2" value="42"/>
</match>
</magic>
<glob pattern="*.tiff"/>
<glob pattern="*.tif"/>
</mime-type>

<mime-type type="image/jpeg">
<comment>JPEG raster data</comment>
<comment xml:lang="de">JPEG-Rasterdaten</comment>
<icon name="qgis-mime"/>
<magic priority="50">
<match type="big16" offset="0" value="65496"/>
</magic>
<glob pattern="*.jpeg"/>
<glob pattern="*.jpg"/>
</mime-type>

<mime-type type="image/jp2">
<comment>JPEG2000 raster data</comment>
<comment xml:lang="de">JPEG2000-Rasterdaten</comment>
<icon name="qgis-mime"/>
<magic priority="50">
<match type="little32" offset="0" value="12">
<match type="string" offset="8" value="jP">
<match type="byte" offset="10" value="32">
<match type="byte" offset="11" value="32">
<match type="byte" offset="12" value="13">
<match type="byte" offset="13" value="10">
<match type="byte" offset="14" value="135">
<match type="byte" offset="13" value="10"/>
</match>
</match>
</match>
</match>
</match>
</match>
</match>
</magic>
<glob pattern="*.jp2"/>
<glob pattern="*.j2k"/>
</mime-type>

<mime-type type="application/x-raster-aig">
<comment>AIG raster data</comment>
<comment xml:lang="de">AIG-Rasterdaten</comment>
<icon name="qgis-mime"/>
<glob pattern="*.aig"/>
</mime-type>

<mime-type type="application/x-raster-ecw">
<comment>ECW raster data</comment>
<comment xml:lang="de">ECW-Rasterdaten</comment>
<icon name="qgis-mime"/>
<glob pattern="*.ecw"/>
</mime-type>

<mime-type type="application/x-raster-mrsid">
<comment>MrSID raster data</comment>
<comment xml:lang="de">MrSID-Rasterdaten</comment>
<icon name="qgis-mime"/>
<glob pattern="*.sid"/>
</mime-type>

<mime-type type="application/x-mapinfo-mif">
<comment>MapInfo file</comment>
<comment xml:lang="de">MapInfo-Datei</comment>
<icon name="qgis-mime"/>
<magic priority="51">
<match type="string" offset="0" value="VERSION">
<match type="string" offset="0:512" value="COLUMNS"/>
<match type="string" offset="0:512" value="DATA">
</match>
</match>
</magic>
<glob weight="60" pattern="*.mif"/>
</mime-type>

<!-- .mif is just not good enough -->
<mime-type type="application/x-adobe-mif">
<alias type="application/x-mif"/>
<comment>Adobe FrameMaker MIF file</comment>
<magic priority="100">
<match type="string" offset="0" value="&lt;MIFFile"/>
</magic>
<glob weight="51" pattern="*.mif"/>
</mime-type>

<mime-type type="application/vnd.google-earth.kml+xml">
<comment>Keyhole Markup Language data</comment>
<sub-class-of type="application/xml"/>
<icon name="qgis-mime"/>
<glob pattern="*.kml"/>
</mime-type>

<mime-type type="application/vnd.google-earth.kmz">
<comment>Zipped Keyhole Markup Language data</comment>
<sub-class-of type="application/zip"/>
<icon name="qgis-mime"/>
<glob pattern="*.kmz"/>
</mime-type>

<mime-type type="application/geopackage+sqlite3">
<comment>GeoPackage data</comment>
<sub-class-of type="application/vnd.sqlite3"/>
<icon name="qgis-mime"/>
<glob pattern="*.gpkg"/>
</mime-type>

</mime-info>
33 changes: 28 additions & 5 deletions draft_images/test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,35 @@ RUN echo ${PATH}

USER root
RUN echo ${PATH}
RUN /pyrocket_scripts/install-conda-packages.sh || echo "install-conda-packages.sh failed" || true
RUN /pyrocket_scripts/install-r-package.sh || echo "install-r-package.sh failed" || true
RUN /pyrocket_scripts/install-pip-packages.sh || echo "install-pip-packages.sh failed" || true
RUN /pyrocket_scripts/install-apt-packages.sh || echo "install-apt-packages.sh failed" || true
RUN /pyrocket_scripts/install-conda-packages.sh environment.yml || echo "install-conda-packages.sh failed" || true
RUN /pyrocket_scripts/install-r-packages.sh install.R || echo "install-r-package.sh failed" || true
RUN /pyrocket_scripts/install-pip-packages.sh requirements.txt || echo "install-pip-packages.sh failed" || true
RUN /pyrocket_scripts/install-apt-packages.sh apt.txt || echo "install-apt-packages.sh failed" || true
RUN /pyrocket_scripts/install-desktop.sh || echo "setup-desktop.sh failed" || true
RUN /pyrocket_scripts/run-postbuild.sh || echo "run-postbuild.sh failed" || true
RUN /pyrocket_scripts/setup-start.sh || echo "setup-start.sh failed" || true
RUN /pyrocket_scripts/setup-desktop.sh || echo "setup-desktop.sh failed" || true
USER ${NB_USER}

USER root
# install the geospatial libraries and R spatial; the rocket script are part of py-rocket-base
RUN PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin && \
/rocker_scripts/install_geospatial.sh

# Install cwutils
RUN cd /tmp && \
wget https://www.star.nesdis.noaa.gov/socd/coastwatch/cwf/cwutils-4_0_0_198-linux-x86_64.tar.gz && \
tar -zxf cwutils-4_0_0_198-linux-x86_64.tar.gz && \
rm -rf cwutils-4_0_0_198-linux-x86_64.tar.gz
ENV PATH=${PATH}:/tmp/cwutils_4.0.0.198/bin
ENV MANPATH=${MANPATH}:/tmp/cwutils_4.0.0.198/doc/man
ENV INSTALL4J ADD VM PARAMS=-Dsun.java2d.uiScale=2.0

# Install panoply
RUN cd /tmp && \
wget --user-agent="Mozilla/5.0" https://www.giss.nasa.gov/tools/panoply/download/PanoplyJ-5.5.4.tgz && \
tar -zxf PanoplyJ-5.5.4.tgz && \
rm -rf PanoplyJ-5.5.4.tgz
ENV PATH=${PATH}:/tmp/PanoplyJ

USER ${NB_USER}
WORKDIR ${HOME}
4 changes: 1 addition & 3 deletions draft_images/test/apt.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Some useful stuff
# for qgis
libgl1-mesa-glx

# Add some more
# or not
3 changes: 1 addition & 2 deletions draft_images/test/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ dependencies:
- xmip
- spectral # pure Python module for processing hyperspectral image data


# Desktop tools whose versions are more recent on conda-forge than ubuntu
# Desktop tools
- qgis
- pyopencl # Maybe needed for qgis? https://github.com/conda-forge/qgis-feedstock/issues/263
# Resolves warning "No ICDs were found": https://github.com/CryoInTheCloud/hub-image/issues/50
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions draft_images/test/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e

export TEST=abc

exec "$@"

0 comments on commit 10dd452

Please sign in to comment.