From 4ed1c534dae65ab6b4f4bb72171438620a870666 Mon Sep 17 00:00:00 2001 From: AsymmetryChou <181240085@smail.nju.edu.cn> Date: Sun, 5 Jul 2026 20:08:59 +0800 Subject: [PATCH 1/3] update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0a23ae0..a24c778 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ examples/hBN/negf_output_k70/self_energy/* examples/CNT/output/* examples/long_cnt/* CLAUDE* +ai_docs/* run_config.json From 742db118c868bcb59890fe7077e7d44c067ac782 Mon Sep 17 00:00:00 2001 From: AsymmetryChou <181240085@smail.nju.edu.cn> Date: Sun, 5 Jul 2026 20:27:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Dockerfile=20=E4=B8=AD?= =?UTF-8?q?=20PyTorch=20=E5=92=8C=20torch-scatter=20=E7=9A=84=E7=89=88?= =?UTF-8?q?=E6=9C=AC=EF=BC=8C=E4=BB=A5=E5=87=8F=E5=B0=8F=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E4=BD=93=E7=A7=AF=E5=B9=B6=E7=A1=AE=E4=BF=9D=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7de2431..a8a1d96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,14 +37,14 @@ RUN \ conda create -n dpnegf python=3.10 -c conda-forge -y && \ git clone https://github.com/deepmodeling/DeePTB.git && \ conda run -n dpnegf pip install --upgrade pip setuptools wheel && \ - # [1] 强制拉取纯 CPU 版本的 PyTorch 2.1.1,极大地减小镜像体积并对齐底层接口 - conda run -n dpnegf pip install torch==2.1.1 --index-url https://download.pytorch.org/whl/cpu && \ + # [1] 强制拉取纯 CPU 版本的 PyTorch 2.5.1,极大地减小镜像体积并对齐底层接口 + conda run -n dpnegf pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cpu && \ # [2] 强制使用 PyG 专属源拉取 torch-scatter,并使用 --only-binary=torch-scatter 彻底关闭源码编译。 # 这样如果找不到精确匹配的 Wheel,它会立刻报错,而不是花 10 分钟编译出一个会引发崩溃的包。 - conda run -n dpnegf pip install torch-scatter -f https://data.pyg.org/whl/torch-2.1.1+cpu.html --only-binary=torch-scatter && \ + conda run -n dpnegf pip install torch-scatter -f https://data.pyg.org/whl/torch-2.5.0+cpu.html --only-binary=torch-scatter && \ # [3] 给本地仓库的安装加上 CPU 源保护,防止安装过程触发隐藏依赖,把刚才装好的 CPU 版 Torch 顶替成带 CUDA 的版本 - conda run -n dpnegf pip install ./DeePTB torch==2.1.1 --extra-index-url https://download.pytorch.org/whl/cpu && \ - conda run -n dpnegf pip install ./ torch==2.1.1 --extra-index-url https://download.pytorch.org/whl/cpu && \ + conda run -n dpnegf pip install ./DeePTB torch==2.5.1 --extra-index-url https://download.pytorch.org/whl/cpu && \ + conda run -n dpnegf pip install ./ torch==2.5.1 --extra-index-url https://download.pytorch.org/whl/cpu && \ conda clean --all -y && \ rm -rf /root/.cache/pip From 85f17a57af689f8dad47c3ab423ce5cf160c03b3 Mon Sep 17 00:00:00 2001 From: AsymmetryChou <181240085@smail.nju.edu.cn> Date: Sun, 5 Jul 2026 20:28:24 +0800 Subject: [PATCH 3/3] update docs --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a8a1d96..1e020c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,22 +31,22 @@ RUN apt-get update > /dev/null && \ WORKDIR /app COPY . . -# 2. 创建环境并安装所有依赖 +# 2. Create the environment and install all dependencies RUN \ sed -i 's/build-backend = "poetry_dynamic_versioning.backend"/build-backend = "poetry.core.masonry.api"/' pyproject.toml && \ conda create -n dpnegf python=3.10 -c conda-forge -y && \ git clone https://github.com/deepmodeling/DeePTB.git && \ conda run -n dpnegf pip install --upgrade pip setuptools wheel && \ - # [1] 强制拉取纯 CPU 版本的 PyTorch 2.5.1,极大地减小镜像体积并对齐底层接口 + # [1] Force the CPU-only PyTorch 2.5.1 wheel to shrink the image and align the low-level ABI. conda run -n dpnegf pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cpu && \ - # [2] 强制使用 PyG 专属源拉取 torch-scatter,并使用 --only-binary=torch-scatter 彻底关闭源码编译。 - # 这样如果找不到精确匹配的 Wheel,它会立刻报错,而不是花 10 分钟编译出一个会引发崩溃的包。 + # [2] Pull torch-scatter from the PyG wheel index and use --only-binary=torch-scatter to fully disable source builds. + # If no matching wheel is found it fails immediately instead of spending ~10 minutes compiling a package that would crash at runtime. conda run -n dpnegf pip install torch-scatter -f https://data.pyg.org/whl/torch-2.5.0+cpu.html --only-binary=torch-scatter && \ - # [3] 给本地仓库的安装加上 CPU 源保护,防止安装过程触发隐藏依赖,把刚才装好的 CPU 版 Torch 顶替成带 CUDA 的版本 + # [3] Guard the local-repo installs with the CPU index so hidden dependencies can't replace the CPU torch with a CUDA build. conda run -n dpnegf pip install ./DeePTB torch==2.5.1 --extra-index-url https://download.pytorch.org/whl/cpu && \ conda run -n dpnegf pip install ./ torch==2.5.1 --extra-index-url https://download.pytorch.org/whl/cpu && \ conda clean --all -y && \ rm -rf /root/.cache/pip -# 3. 设置默认启动环境 +# 3. Activate the dpnegf environment by default in interactive shells RUN echo "conda activate dpnegf" >> ~/.bashrc