diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml new file mode 100644 index 00000000..7539d338 --- /dev/null +++ b/.github/workflows/publish-docker.yml @@ -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 diff --git a/README.md b/README.md index cac58934..36a321aa 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/apex/__init__.py b/apex/__init__.py index 6f22c926..220d954f 100644 --- a/apex/__init__.py +++ b/apex/__init__.py @@ -1,5 +1,5 @@ import os -__version__ = '1.3.0' +__version__ = '1.3.0.post1' LOCAL_PATH = os.getcwd() diff --git a/apex/account.py b/apex/account.py index eb675738..42e575b2 100644 --- a/apex/account.py +++ b/apex/account.py @@ -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" diff --git a/docs/Dockerfile.bohrium b/docs/Dockerfile.bohrium new file mode 100644 index 00000000..1c516bc0 --- /dev/null +++ b/docs/Dockerfile.bohrium @@ -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"] diff --git a/examples/abacus/global_bohrium.json b/examples/abacus/global_bohrium.json index 14b1604e..ee084e13 100644 --- a/examples/abacus/global_bohrium.json +++ b/examples/abacus/global_bohrium.json @@ -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", diff --git a/examples/annealing/frozen_model.pb b/examples/annealing/frozen_model.pb new file mode 100755 index 00000000..2adc962a Binary files /dev/null and b/examples/annealing/frozen_model.pb differ diff --git a/examples/lammps/apex_lammps_tutorial.md b/examples/lammps/apex_lammps_tutorial.md index 7d33e232..469b4641 100755 --- a/examples/lammps/apex_lammps_tutorial.md +++ b/examples/lammps/apex_lammps_tutorial.md @@ -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" diff --git a/examples/lammps/lammps_tutorial1_quick_start/lammps_example1.1_Mo/global_bohrium.json b/examples/lammps/lammps_tutorial1_quick_start/lammps_example1.1_Mo/global_bohrium.json index ef92c756..06aa61a6 100755 --- a/examples/lammps/lammps_tutorial1_quick_start/lammps_example1.1_Mo/global_bohrium.json +++ b/examples/lammps/lammps_tutorial1_quick_start/lammps_example1.1_Mo/global_bohrium.json @@ -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" diff --git a/examples/lammps/lammps_tutorial2_submission_methods/lammps_example2.1_bohrium/global_bohrium.json b/examples/lammps/lammps_tutorial2_submission_methods/lammps_example2.1_bohrium/global_bohrium.json index ef92c756..06aa61a6 100755 --- a/examples/lammps/lammps_tutorial2_submission_methods/lammps_example2.1_bohrium/global_bohrium.json +++ b/examples/lammps/lammps_tutorial2_submission_methods/lammps_example2.1_bohrium/global_bohrium.json @@ -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" diff --git a/examples/vasp/global_bohrium.json b/examples/vasp/global_bohrium.json index 2443a2e7..c551a281 100755 --- a/examples/vasp/global_bohrium.json +++ b/examples/vasp/global_bohrium.json @@ -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", diff --git a/setup.py b/setup.py index 9c79818a..5054f88b 100644 --- a/setup.py +++ b/setup.py @@ -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", diff --git a/tests/test_account_config.py b/tests/test_account_config.py index 1e7ce6c6..111e70ac 100644 --- a/tests/test_account_config.py +++ b/tests/test_account_config.py @@ -6,6 +6,7 @@ from apex.account import ( BOHRIUM_WORKFLOWS_HOST, + DEFAULT_BOHRIUM_CONFIG, merge_bohrium_defaults, ) from apex.utils import load_config_file @@ -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):