Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temsim container #9

Merged
merged 5 commits into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/temsimulator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Building TEM simulator container"

on:
push:
branches: [ master, temsim-container ]

pull_request:
branch: [ master, temsim-container ]

jobs:
build:
runs-on: ubuntu-latest
geoffwoollard marked this conversation as resolved.
Show resolved Hide resolved
steps:

- name: Check Out Repo
uses: actions/checkout@v2

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Login to Docker Hub
uses: docker/login-action@v1
geoffwoollard marked this conversation as resolved.
Show resolved Hide resolved
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./docker/TEM-simulator/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/simspi-temsimulator:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
geoffwoollard marked this conversation as resolved.
Show resolved Hide resolved
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
19 changes: 19 additions & 0 deletions docker/TEM-simulator/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# syntax=docker/dockerfile:1
FROM ubuntu:18.04

WORKDIR /work

RUN apt-get update && \
apt-get install -y git wget unzip build-essential

RUN wget 'http://www.fftw.org/fftw-3.3.10.tar.gz' && \
tar -xzvf fftw-3.3.10.tar.gz && \
cd fftw-3.3.10 && ./configure && make && make install && \
cd /work && rm -rf fftw-3.3.10*

RUN wget 'https://iweb.dl.sourceforge.net/project/tem-simulator/TEM-simulator_1.3.zip' && \
unzip TEM-simulator_1.3.zip && \
cd TEM-simulator_1.3/src && make && \
cd /work && rm -f TEM-simulator_1.3.zip

ENV PATH=/work/TEM-simulator/src:$PATH