Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
37 changes: 37 additions & 0 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Docker image

on:
workflow_dispatch:
inputs:
tag:
description: Docker image tag
required: true
default: "1.3.0"

permissions:
contents: read
packages: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v6
with:
context: .
file: docs/Dockerfile.bohrium
platforms: linux/amd64
push: true
tags: |
ghcr.io/zikkying/apex-flow:${{ inputs.tag }}
ghcr.io/zikkying/apex-flow:latest
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ When you run `apex submit -c global_bohrium.json`, APEX auto-fills these default
- `k8s_api_server`: `https://workflows.deepmodeling.com`
- `batch_type`: `Bohrium`
- `context_type`: `Bohrium`
- `apex_image_name`: `registry.dp.tech/dptech/prod-11045/apex-dependency:1.2.0`
- `apex_image_name`: `registry.dp.tech/dptech/dp/native/prod-397637/apex:1.3.0`

Priority rule: values in your `-c` json file override account defaults.

Expand Down
2 changes: 1 addition & 1 deletion apex/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
__version__ = '1.3.0'
__version__ = '1.3.0.post1'
LOCAL_PATH = os.getcwd()


Expand Down
2 changes: 1 addition & 1 deletion apex/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"k8s_api_server": BOHRIUM_WORKFLOWS_HOST,
"batch_type": "Bohrium",
"context_type": "Bohrium",
"apex_image_name": "registry.dp.tech/dptech/prod-11045/apex-dependency:1.2.0",
"apex_image_name": "registry.dp.tech/dptech/dp/native/prod-397637/apex:1.3.0",
}
SENSITIVE_KEYS = {"password"}
ACCOUNT_FILE_ENV = "APEX_ACCOUNT_FILE"
Expand Down
26 changes: 26 additions & 0 deletions docs/Dockerfile.bohrium
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM python:3.10-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
build-essential \
openssh-server \
supervisor \
net-tools \
&& rm -rf /var/lib/apt/lists/*

RUN python -m pip install --upgrade pip setuptools wheel

RUN python -m pip install apex-flow==1.3.0.post1

RUN python - <<'PY'
import apex
print(apex.__version__)
PY

CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion examples/abacus/global_bohrium.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"email": "YOUR_EMAIL",
"password": "YOUR_PASSWD",
"program_id": 1234,
"apex_image_name":"registry.dp.tech/dptech/prod-11045/apex-dependency:1.2.0",
"apex_image_name":"registry.dp.tech/dptech/dp/native/prod-397637/apex:1.3.0",
"abacus_image_name":"registry.dp.tech/dptech/abacus:3.2.3",
"abacus_run_command":"mpirun -n 32 abacus",
"batch_type": "Bohrium",
Expand Down
Binary file added examples/annealing/frozen_model.pb
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/lammps/apex_lammps_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Bohrium platform provides pre-configured environments, automated scheduling, and
"email": "your_email@example.com",
"password": "your_password",
"program_id": 12345,
"apex_image_name": "registry.dp.tech/dptech/prod-11045/apex-dependency:1.2.0",
"apex_image_name": "registry.dp.tech/dptech/dp/native/prod-397637/apex:1.3.0",
"lammps_image_name": "registry.dp.tech/dptech/prod-11045/deepmdkit-phonolammps:3.1.1",
"lammps_run_command": "lmp -in in.lammps",
"scass_type": "c8_m31_1 * NVIDIA T4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"email": "YOUREMAIL@abc.com",
"password": "password",
"program_id": 1234,
"apex_image_name":"registry.dp.tech/dptech/prod-11045/apex-dependency:1.2.0",
"apex_image_name":"registry.dp.tech/dptech/dp/native/prod-397637/apex:1.3.0",
"lammps_image_name": "registry.dp.tech/dptech/deepmd-kit:3.1.1",
"lammps_run_command":"lmp -in in.lammps",
"scass_type":"c8_m31_1 * NVIDIA T4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"email": "YOUREMAIL@abc.com",
"password": "password",
"program_id": 1234,
"apex_image_name":"registry.dp.tech/dptech/prod-11045/apex-dependency:1.2.0",
"apex_image_name":"registry.dp.tech/dptech/dp/native/prod-397637/apex:1.3.0",
"lammps_image_name": "registry.dp.tech/dptech/deepmd-kit:3.1.1",
"lammps_run_command":"lmp -in in.lammps",
"scass_type":"c8_m31_1 * NVIDIA T4"
Expand Down
2 changes: 1 addition & 1 deletion examples/vasp/global_bohrium.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"password": "YOUR_PASSWD",
"program_id": 1234,
"group_size": 1,
"apex_image_name":"registry.dp.tech/dptech/prod-11045/apex-dependency:1.2.0",
"apex_image_name":"registry.dp.tech/dptech/dp/native/prod-397637/apex:1.3.0",
"vasp_image_name":"registry.dp.tech/dptech/vasp:5.4.4-dflow",
"vasp_run_command":"bash -c \"source /opt/intel/oneapi/setvars.sh && ulimit -s unlimited && mpirun -n 32 /opt/vasp.5.4.4/bin/vasp_std \"",
"batch_type": "Bohrium",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="apex-flow",
version="1.3.0",
version="1.3.0.post1",
author="Zhuoyuan Li, Tongqi Wen",
author_email="zhuoyli@outlook.com",
description="Alloy Properties EXplorer using simulations",
Expand Down
5 changes: 5 additions & 0 deletions tests/test_account_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from apex.account import (
BOHRIUM_WORKFLOWS_HOST,
DEFAULT_BOHRIUM_CONFIG,
merge_bohrium_defaults,
)
from apex.utils import load_config_file
Expand All @@ -22,6 +23,10 @@ def test_merge_bohrium_defaults_for_bohrium_config_file(self):
self.assertEqual(merged["k8s_api_server"], BOHRIUM_WORKFLOWS_HOST)
self.assertEqual(merged["batch_type"], "Bohrium")
self.assertEqual(merged["context_type"], "Bohrium")
self.assertEqual(
merged["apex_image_name"],
DEFAULT_BOHRIUM_CONFIG["apex_image_name"]
)
self.assertEqual(merged["scass_type"], "c8_m31_1 * NVIDIA T4")

def test_json_overrides_account_defaults(self):
Expand Down
Loading