Skip to content

Commit

Permalink
CI: ensuring docker build to use the latest codes (#1498)
Browse files Browse the repository at this point in the history
  • Loading branch information
caic99 committed Nov 11, 2022
1 parent 69c29e3 commit f7e65f9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# To build this Dockerfile, run `docker build -t abacus - < Dockerfile`.
# Build without cloning the repo by `docker build https://github.com/deepmodeling/abacus-develop.git#develop`,
# and optionally choose the Dockerfile in use by appending e.g. `-f Dockerfile.gnu`.
# Alternatively, pull the image with `docker pull ghcr.io/deepmodeling/abacus:latest`.
# Also available at `docker pull registry.dp.tech/deepmodeling/abacus:latest`.

Expand All @@ -13,6 +15,11 @@ RUN apt update && apt install -y --no-install-recommends \

ENV GIT_SSL_NO_VERIFY=true TERM=xterm-256color \
OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 OMPI_MCA_btl_vader_single_copy_mechanism=none

# This will fetch the latest commit info, and store in docker building cache.
# If there are newer commits, docker build will ignore the cache and build latest codes.
ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/develop /dev/null

RUN git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \
cd abacus-develop && \
cmake -B build && \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ RUN wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-wit

ENV CMAKE_PREFIX_PATH=/opt/libtorch/share/cmake

ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/develop /dev/null

RUN git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \
cd abacus-develop && \
cmake -B build -DENABLE_DEEPKS=ON && \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.intel
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ RUN wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-wit

ENV CMAKE_PREFIX_PATH=/opt/libtorch/share/cmake

ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/develop /dev/null

RUN git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \
cd abacus-develop && \
cmake -B build -DENABLE_DEEPKS=ON && \
Expand Down

0 comments on commit f7e65f9

Please sign in to comment.