Skip to content

Commit

Permalink
more docs and base-image from GHCR
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Oct 18, 2023
1 parent c2ae90d commit fadb6ad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ The synop2bufr Python module contains both a command line interface and API to c

Dependencies are listed in [requirements.txt](https://github.com/wmo-im/synop2bufr/blob/main/requirements.txt). Dependencies are automatically installed during synop2bufr installation.

## Running

To run synop2bufr from a docker container:

```console
docker build -t synop2bufr:local .
docker run -it -v ${pwd}:/local synop2bufr
```

## Running

Example data can be found in `data` directory, with the corresponding reference BUFR4 in `data/bufr`.

To transform SYNOP data file into BUFR:
Expand All @@ -29,6 +31,8 @@ mkdir output-data
synop2bufr data transform --metadata data/station_list.csv --year 2023 --month 03 --output-dir output-data data/A_SMRO01YRBK211200_C_EDZW_20220321120500_12524785.txt
```

To run synop2bufr inside a Lambda function on Amazon Web Services, please refer to [aws-lambda/README.md](aws-lambda/README.md) and use this [Dockerfile](aws-lambda/Dockerfile) to build the container image for the Lambda function.

## Usage Guide

Here we detail how synop2bufr can be used.
Expand Down
2 changes: 1 addition & 1 deletion aws-lambda/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Define custom function directory
ARG FUNCTION_DIR="/function"

FROM wmoim/dim_eccodes_baseimage:2.31.0
FROM ghcr.io/wmo-im/dim_eccodes_baseimage:2.31.0

# Include global arg in this stage of the build
ARG FUNCTION_DIR
Expand Down
7 changes: 3 additions & 4 deletions aws-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

## Overview

AWS Lambda is a service from Amazon that enables publishing
code which is executed as on demand functions.
AWS Lambda is a service from Amazon that enables publishing code which is executed as on demand functions.

This directory contains the Dockerfile and example lambda function code that will run the synop2bufr-transformation on files received in S3.

## lambda container

To run synop2bufr on Lambda requires a custom container image. The Dockerfile in this directory.
The Dockerfile in this directory will build the container image that can be used to run synop2bufr on Lambda.

# to build docker container
# build and deploy
```bash
docker build -t synop2bufr-lambda .
```
Expand Down

0 comments on commit fadb6ad

Please sign in to comment.