Skip to content

Private NAMD container workflow #86

Private NAMD container workflow

Private NAMD container workflow #86

Workflow file for this run

name: Build Docker image
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
pull_request:
branches: ['main']
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-common-image:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64]
build: ["common-cpu", "common-gpu"]
permissions:
contents: read
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Option
id: option
run: |
if [ "${{ matrix.build }}" == "common-cpu" ]; then
echo GMX_OPTS= >> $GITHUB_ENV
echo LMP_OPTS= >> $GITHUB_ENV
echo NAMD_OPTS= >> $GITHUB_ENV
echo DOCKERFILE="CPU.Dockerfile" >> $GITHUB_ENV
else
echo GMX_OPTS="-DGMX_GPU=CUDA" >> $GITHUB_ENV
echo LMP_OPTS="-DPKG_GPU=on -DGPU_API=cuda" >> $GITHUB_ENV
echo NAMD_OPTS="--with-cuda" >> $GITHUB_ENV
echo DOCKERFILE="GPU.Dockerfile" >> $GITHUB_ENV
fi
# - name: Build and push Docker image
# uses: docker/build-push-action@v5
# with:
# context: ./docker/common
# push: false
# file: ./docker/common/${{ env.DOCKERFILE }}
# build-args: |
# GMX_OPTS="${{ env.GMX_OPTS }}"
# LMP_OPTS="${{ env.LMP_OPTS }}"
# CUDA_VER=12.4.1
# DISTRO_ARCH=${{ matrix.arch }}
# DISTRO_VER=22.04
# DISTRO_NAME=ubuntu
- name: Build and push private NAMD Docker image
uses: docker/build-push-action@v5
with:
context: ./docker/namd
file: ./docker/namd/${{ env.DOCKERFILE }}
push: false
build-args: |
NAMD_OPTS="${{ env.NAMD_OPTS }}"
CUDA_VER=12.4.1
DISTRO_ARCH=${{ matrix.arch }}
DISTRO_VER=22.04
DISTRO_NAME=ubuntu
secrets: |
NAMD_ACCESS_TOKEN=${{ secrets.NAMD_ACCESS_TOKEN }}