https://github.com/geoscienceaustralia/dea-sandbox
Digital Earth Australia Sandbox config and planning
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.2%) to scientific vocabulary
Repository
Digital Earth Australia Sandbox config and planning
Basic Info
- Host: GitHub
- Owner: GeoscienceAustralia
- License: apache-2.0
- Language: Python
- Default Branch: develop
- Size: 348 KB
Statistics
- Stars: 15
- Watchers: 26
- Forks: 7
- Open Issues: 21
- Releases: 45
Metadata Files
README.md
DEA Sandbox
The DEA Sandbox is a hosted JupyterLab environment preloaded with the DEA Python environment and example notebooks from DEA Notebooks. This repository contains the Docker build configuration used to create the environment for both internal testing and the public DEA Sandbox.
Automated builds
Docker images are built automatically from this repository and pushed to the dea-sandbox AWS Elastic Container Registry (ECR) repository.
Two main server types use these images:
- Unstable Sandbox servers: used internally for testing changes and updating DEA Notebooks for upcoming environments.
- Default Sandbox servers: public-facing stable servers for general use.
Updating unstable Sandbox servers
- Create a branch and implement your changes, then submit a pull request.
- On PR creation, a Docker image is built and a simple integration test is run against a subset of DEA Notebooks. (Failures are expected if breaking changes occur upstream, and resolution by updating DEA Notebooks can be deferred until the image is made available on unstable Sandbox servers.)
- Once the PR is merged, a build will run and the resultant Docker image will be pushed to ECR and tagged
latest. (It is also tagged with a git reference.) - The
latestimage is automatically deployed to the unstable Sandbox servers. - Review or run the DEA Notebooks scheduled integration tests to check the full DEA Notebooks repository against the new image.
- Work with the DEA Notebooks Community of Practice to resolve any issues before promoting to stable.
[!TIP]
The integration tests in this repository test only a small subset of DEA Notebooks, and are intended to identify major issues only. Refer to the DEA Notebooks scheduled integration tests for the comprehensive test suite.
Updating default Sandbox servers
- Confirm that all issues found in the DEA Notebooks scheduled integration tests for the
latestimage have been resolved or discussed with the DEA Notebooks Community of Practice. - When ready for a stable release, create a new release using the format
major.minor.patch(e.g.,2.0.1). - The presence of this new git tag triggers pushing a build that will have an image tag exactly matching the git tag. (It will also be tagged
stable.) - JupyterHub deployments can be updated to pin the new version number (e.g.
2.0.1) as their singleuser image tag. (Directly referencingstableis currently discouraged, for greater assurance of stability.)
Packages' version maintenance and upgrade
The base environment uses Conda, and the Docker image is built in the following stages:
- Conda install: Create the Conda environment and install as many packages as possible from
conda-forge. - Pip install: Install remaining packages (e.g., most
odc-packages) via pip. - Copy the completed environment into a new Ubuntu base image.
To speed up the build, the workflow pulls images from a cache stored on ECR. However, with every build the cache layers starting from pip install will be discarded, so that the newest versions of odc- packages will be installed. Thus, to perform version upgrades on these packages, creating a release is sufficient.
The old Conda env cache is used for all builds unless env.yml is changed. In addition to speeding up builds, this cached environment allows us to maintain a working odc- codebase and defer resolving conflicts on geospatial base packages such as GDAL and GEOS, until we have a good opportunity to manually review them.
The steps for package version upgrades are as follows:
- For
odc-packages, create a new release. - For packages listed in
env.yml, be specific with the version required, for example,Shapely>=2.0.
Note: Avoid using == or <=, unless there is a hard requirement or a very good reason. Ensure you specify this reason clearly in your PR; what is it required for, your justification, and any supporting PRs (if applicable).
Local environment
Simple test environment
A simple local environment that can be used to test the JupyterHub system in can be started using Docker Compose
with the command docker-compose up
if the container started up successfully, it will show console log similar to the following
dea-sandbox-sandbox-1 | [C 2022-12-08 03:02:47.100 ServerApp]
dea-sandbox-sandbox-1 |
dea-sandbox-sandbox-1 | To access the server, open this file in a browser:
dea-sandbox-sandbox-1 | file:///home/jovyan/.local/share/jupyter/runtime/jpserver-7-open.html
dea-sandbox-sandbox-1 | Or copy and paste one of these URLs:
dea-sandbox-sandbox-1 | http://5cf0ca7d3dd0:9988/lab?token=bedea39c6e6ef14f633a99968cf47ec891588b6e14ec0862
dea-sandbox-sandbox-1 | or http://127.0.0.1:9988/lab?token=bedea39c6e6ef14f633a99968cf47ec891588b6e14ec0862
browsing to http://localhost:9988 and adding the token that is displayed
on your terminal, i.e. http://localhost:9988/lab?token=bedea39c6e6ef14f633a99968cf47ec891588b6e14ec0862
Tip for hosting behind reverse proxy
``` location / { proxysetheader Host $httphost; proxysetheader X-Forwarded-For $remoteaddr; proxyreadtimeout 300s; proxyconnecttimeout 75s;
# forward to port 9988
proxy_pass "http://localhost:9988";
# for terminal and notebook websockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
```
With DEA database
To run docker-compose with a DEA indexed database, you'll need to start a Kubernetes port forwading process
with a command like port-forward -n service deployment/pg-proxy 5432:5432.
And then set up a file in the root of this folder .env with connection details in it. Use the
.env.example as a template for this file. You then want to run the Docker Compose environment without a
postgres database, so use the command docker-compose -f docker-compose.yml up to start it. This will ignore
the docker-compose.override.yml file, which provides a postgres container.
Any files in the ./notebooks folder will be mounted in the user's home folder. That is to say that ./notebooks
will be mounted at /home/jovyan/
Owner
- Name: Geoscience Australia
- Login: GeoscienceAustralia
- Kind: organization
- Location: Canberra, Australia
- Website: http://www.ga.gov.au/
- Repositories: 333
- Profile: https://github.com/GeoscienceAustralia
GitHub Events
Total
- Create event: 3
- Commit comment event: 1
- Release event: 1
- Watch event: 3
- Delete event: 4
- Member event: 1
- Issue comment event: 10
- Push event: 27
- Pull request review comment event: 1
- Pull request event: 14
- Pull request review event: 4
- Fork event: 1
Last Year
- Create event: 2
- Commit comment event: 1
- Watch event: 3
- Delete event: 4
- Member event: 1
- Issue comment event: 10
- Push event: 26
- Pull request review event: 3
- Pull request review comment event: 1
- Pull request event: 13
- Fork event: 1
Issues and Pull Requests
Last synced: 5 months ago
All Time
- Total issues: 72
- Total pull requests: 140
- Average time to close issues: 7 months
- Average time to close pull requests: 19 days
- Total issue authors: 18
- Total pull request authors: 18
- Average comments per issue: 1.43
- Average comments per pull request: 0.72
- Merged pull requests: 110
- Bot issues: 0
- Bot pull requests: 11
Past Year
- Issues: 0
- Pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: about 2 months
- Issue authors: 0
- Pull request authors: 4
- Average comments per issue: 0
- Average comments per pull request: 1.0
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- caitlinadams (15)
- robbibt (13)
- chriscmorgan (10)
- tom-butler (6)
- Kirill888 (5)
- pindge (5)
- MatthewJA (3)
- cbur24 (3)
- benjimin (2)
- CEKrause (2)
- patrickmuston1 (1)
- cedricump (1)
- kitmacleod (1)
- emmaai (1)
- woodcockr (1)
Pull Request Authors
- robbibt (28)
- emmaai (27)
- Kirill888 (26)
- alexgleith (15)
- dependabot[bot] (11)
- pindge (8)
- Ariana-B (6)
- tom-butler (5)
- BexDunn (2)
- gordonyeong (2)
- NikitaGandhi (2)
- omad (2)
- stacyhorton (1)
- dunkgray (1)
- geoscience-aman (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- OWSLib *
- Pillow *
- Rtree *
- access *
- affine *
- aiobotocore ==1.4.1
- alabaster *
- astropy *
- bokeh *
- boltons *
- bottleneck *
- cattrs *
- ciso8601 *
- cligj *
- cmocean *
- colorama *
- contextily *
- dask ==2022.4.1
- dask-image *
- dask-ml *
- dataclasses *
- descartes *
- dill *
- distributed ==2022.4.1
- docutils *
- ffmpeg-python *
- geohash2 *
- geojson *
- geopy *
- h5py *
- jsonschema *
- lark-parser *
- mapclassify *
- matplotlib *
- numba *
- numexpr *
- numexpr3 *
- numpy ==1.21.4
- pandana *
- pandas *
- param *
- pathos *
- protobuf *
- psycopg2 *
- pyTMD *
- pydash *
- pyproj *
- pyrsistent *
- pysal *
- pysheds *
- python-dateutil ==2.8.0
- python-geohash *
- pyyaml *
- rio-cogeo *
- rioxarray *
- s3fs *
- scikit-image *
- scikit-learn *
- scipy *
- seaborn *
- setuptools-scm *
- sqlalchemy *
- structlog *
- tensorflow *
- thredds-crawler *
- toolz *
- tqdm *
- urbanaccess *
- urllib3 *
- voluptuous *
- xarray *
- xgboost *
- zarr *
- actions/checkout v3 composite
- luke142367/Docker-Lint-Action v1.1.1 composite
- wemake-services/docker-image-size-limit master composite
- yuichielectric/dive-action 0.0.3 composite
- actions/checkout v3 composite
- hadolint/hadolint-action v1.5.0 composite
- actions/checkout v3 composite
- aws-actions/configure-aws-credentials v1 composite
- whoan/docker-build-with-cache-action master composite
- aquasecurity/trivy-action 0.0.8 composite
- github/codeql-action/upload-sarif v1 composite
- mambaorg/micromamba git-7545124-jammy build
- ubuntu jammy-20220815 build
- actions/checkout v3 composite
- aws-actions/configure-aws-credentials v1 composite
- datacube-stats *
- fc *
- hdstats *
- wofs *
- datacube *
- eodatasets3 *
- odc-algo *
- odc-apps-dc-tools *
- odc-dscache *
- odc-geom *
- odc-io *
- odc-ui *