Skip to content

Commit b3ebdf3

Browse files
committed
Update lammps.
1 parent 3cc42f3 commit b3ebdf3

2 files changed

Lines changed: 73 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Docker - lammps_gnnp - latest
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- docker/Dockerfile.lammps
8+
workflow_dispatch:
9+
inputs:
10+
task:
11+
type: choice
12+
options: [build]
13+
default: dockerhub
14+
description: Run build and push.
15+
16+
jobs:
17+
dockerhub:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Login to DockerHub
22+
uses: docker/login-action@v3
23+
with:
24+
username: ${{ secrets.DOCKER_HUB_USER }}
25+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
- name: Build and push
31+
uses: docker/build-push-action@v6
32+
with:
33+
platforms: linux/amd64,linux/arm64
34+
context: .
35+
file: docker/Dockerfile.lammps
36+
push: true
37+
tags: materialyzeai/lammps:latest
38+
- name: Image digest
39+
run: echo ${{ steps.docker_build.outputs.digest }}

docker/Dockerfile.lammps

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# We start from a uv image to make life easier.
2+
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
3+
4+
RUN apt-get update -y && apt-get install -y \
5+
build-essential \
6+
git \
7+
cmake \
8+
g++ \
9+
openmpi-bin \
10+
python3 \
11+
python3-venv \
12+
hdf5-tools \
13+
ffmpeg \
14+
python3-dev \
15+
python3-pip \
16+
python3-pkg-resources \
17+
python3-setuptools \
18+
rsync \
19+
ssh \
20+
clang-format \
21+
libopenmpi-dev
22+
23+
RUN mkdir -p code && \
24+
cd code && \
25+
git clone https://github.com/lammps/lammps.git && \
26+
mkdir -p lammps/build-serial && \
27+
cd lammps/build-serial && \
28+
cmake -C ../cmake/presets/basic.cmake -D BUILD_SHARED_LIBS=on -D LAMMPS_EXCEPTIONS=on -D PKG_PYTHON=on -D PKG_ML-GNNP=on -D PKG_ML-SNAP=on -D PKG_EXTRA-COMPUTE=on -D PKG_EXTRA-FIX=on -D PKG_MANYBODY=on -D PKG_EXTRA-DUMP=on -D PKG_MOLECULE=on ../cmake && \
29+
make && \
30+
make install && \
31+
cp lmp /usr/local/bin
32+
33+
ENV PATH="/usr/local/bin:${PATH}"
34+
ENV PYTHONPATH="/code/lammps/src/ML-GNNP"

0 commit comments

Comments
 (0)