Skip to content

Commit

Permalink
merge prep
Browse files Browse the repository at this point in the history
  • Loading branch information
16EAGLE committed Jun 21, 2021
1 parent 6f74cf2 commit 23bed9c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 130 deletions.
87 changes: 0 additions & 87 deletions Dockerfile

This file was deleted.

27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# `odc_box`

This repository hosts all you need to install an *Open Data Cube* instance as a docker container that serves a Jupyter notebook environment running a Python kernel and an R kernel. It is based on the [Cube-in-a-box](https://github.com/opendatacube/cube-in-a-box) project. The changes and additions include (i) a revised `Dockerfile`, adding instructions to install R, its upstream dependencies and connect it with the Jupyter environment, (ii) helper scripts for quick re-deploys of the container environment, (iii) a revised `README.md` and (iv) additional Python dependencies. See the commit history for all changes to the original repository.
This repository hosts all you need to install an *Open Data Cube* instance as a docker container that serves a Jupyter notebook environment running a Python kernel and an R kernel. It is based on the [Cube-in-a-box](https://github.com/opendatacube/cube-in-a-box) project.

## Additional features

* an R kernel and its upstream dependencies, initialized to connect with the Jupyter environment,
* a pre-installed suite of R packages for spatial analysis as well as there system requirements
* helper scripts for quick starting, stoping and re-deploying of the container environment (see below),
* a revised `README.md` with installation instructions

See the commit history for all changes to the original repository.

## Installation

Make sure to have [`docker`](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository) and [`docker-compose`](https://docs.docker.com/compose/install/#install-compose-on-linux-systems) installed on your host system.
Make sure to have [`docker`](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository) and [`docker-compose`](https://docs.docker.com/compose/install/#install-compose-on-linux-systems) installed on your host system. Depending on your host system and your `docker`/`docker_compose` installation, you might need `sudo` rights for the following steps.

Clone this repository to a directory of your choice, e.g. using

Expand All @@ -15,13 +24,13 @@ git clone https://github.com/16EAGLE/odc_box/
and `cd` into its main directory. To start the container (and build it the first time), run:

```
sudo ./docker_start
./docker_start
```

To initialize the jupyter environment and pull Sentinel-2A example data, open a new shell and run:

```
sudo ./docker_init
./docker_init
```

Wait for its completion. You may then now access your local Jupyter environment in a browser on your host machine under [http://localhost](http://localhost). Use the password `secretpassword` to authenticate.
Expand All @@ -31,16 +40,16 @@ See the notebook `Sentinel_2.ipynb` for examples. Note that you can index additi
To stop the container, from a shell other then the one the docker container is running in, run:

```
sudo ./docker_stop
./docker_stop
```

To fully clean your docker environment from images pulled for `odc_box` and to allow a fresh re-deploy, run

```
sudo ./docker_clean
./docker_clean
```

before starting over. Note that with each re-deploy, a new docker volume is created containing your indexed data. You may want to prune your docker volumes from time to time, e.g. using `sudo docker volume rm $(sudo docker volume ls -q -f 'dangling=true')`. Note that this will remove **all** docker volumes, also those from other docker instances that might be running on your host system.
before starting over. Note that with each re-deploy, a new docker volume is created containing your indexed data. You may want to prune your docker volumes from time to time, e.g. using `docker volume rm $(docker volume ls -q -f 'dangling=true')`. Note that this will remove **all** docker volumes, also those from other docker instances that might be running on your host system.


## Troubleshooting
Expand All @@ -50,12 +59,12 @@ before starting over. Note that with each re-deploy, a new docker volume is crea
Error message:

```
sudo ./docker_start
./docker_start
#> ERROR: for postgres Cannot start service postgres: driver failed programming external connectivity on endpoint odc_box_postgres_1 (...): Error starting userland proxy: listen tcp4 0.0.0.0:5432: bind: address already in use
```

Reason: The default `postgres` port `5432` seems to be used by some service (maybe `postgres`?) running on your host system.

Solution: Check whether this is true by running `sudo lsof -i :5432`. You may want to kill the processes that are displayed using their associated PIDs with `kill <PID>`.
Solution: Check whether this is true by running `lsof -i :5432`. You may want to kill the processes that are displayed using their associated PIDs with `kill <PID>`.


5 changes: 0 additions & 5 deletions docker-compose-prod.yml

This file was deleted.

29 changes: 0 additions & 29 deletions docker-compose.yml

This file was deleted.

1 change: 1 addition & 0 deletions docker_clean
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
docker volume rm $(docker volume ls -q -f 'dangling=true')
docker-compose down -v --rmi all --remove-orphans

0 comments on commit 23bed9c

Please sign in to comment.