Git Product home page Git Product logo

lambda-gfortran-fcm-make-netcdf's Introduction

GitHub Actions status

lambda-gfortran-fcm-make-netcdf

Dockerfile based on AWS Lambda Python 3.8 runtime Environment with:

The aim is to provide an easy way to use FCM Make and GFortran to build a Fortran executable that has a dependency on the netCDF library.

The shared libraries are placed under /var/task/, which can then be extracted easily to be part of a lambda package.

The container is currently based on the Python 3.8 lambda runtime, so the Fortran executable is expected to run as a subprocess invoked by a Python lambda handler function.

Usage

Get the image from Docker Hub:

docker pull matthewrmshin/lambda-gfortran-fcm-make-netcdf

docker run --rm -t -i -u "$(id -u):$(id -g)" -v "/path/to/source:/opt/myapp" -v "/path/to/package:/tmp/package" 'matthewrmshin/lambda-gfortran-fcm-make-netcdf' -F '/opt/myapp'

On running the container, it will do:

  • Call fcm make.
    • Any trailing arguments are given to fcm make.
    • Use docker run -e KEY=VALUE ... options to define environment variables.
    • The default working directory is under /tmp/myapp.
  • If /tmp/package exists:
    • Copy /var/task/lib/*.so* to /tmp/package/lib/.
    • Copy /tmp/myapp/build/{bin,etc,lib} to /tmp/package/{bin,etc,lib}.

To package things up...

  • Add a Python module with a lambda handler function to the root of package directory. It should do:
    • Invoke /var/task/bin/... with subprocess.run or otherwise.
    • Turn event + input into input to the Fortran executable.
    • Send output from the Fortran executable to a suitable location.
  • Create a zip file with content of the package directory.
  • Deploy the package.

The lambda-jules repository contains some example usage.

lambda-gfortran-fcm-make-netcdf's People

Contributors

matthewrmshin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.