-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
continue adding deps for container-based build
- Loading branch information
Showing
4 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.ccls-cache/ | ||
/target | ||
**/*.rs.bk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[test_config] | ||
engine = "Llvm" | ||
follow-exec = true | ||
skip-clean = true | ||
target-dir = "target/tarpaulin" | ||
exclude-files = [ | ||
"target/*" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,46 @@ | ||
ARG RUST_VERSION=1.76 | ||
FROM rust:${RUST_VERSION} as builder | ||
FROM rust:1.76 as builder | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/berquist/rchem | ||
LABEL org.opencontainers.image.description="quantum chemistry in Rust" | ||
LABEL org.opencontainers.image.licenses=BSD-3-Clause | ||
|
||
# hadolint ignore=DL3008 | ||
RUN \ | ||
--mount=type=cache,target=/var/cache/apt \ | ||
--mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update \ | ||
&& apt-get install -y --no-install-recommends libgsl-dev \ | ||
&& apt-get install -y --no-install-recommends \ | ||
cmake \ | ||
gfortran \ | ||
libclang-dev \ | ||
libgsl-dev \ | ||
liblapacke-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN cargo install cargo-tarpaulin | ||
|
||
ARG PYENV_ROOT=/pyenv | ||
ENV PYENV_ROOT "${PYENV_ROOT}" | ||
ENV PATH "${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}" | ||
ARG PYTHON_VERSION=3.11.8 | ||
RUN git clone https://github.com/pyenv/pyenv.git "${PYENV_ROOT}" \ | ||
&& pyenv install "${PYTHON_VERSION}" \ | ||
&& pyenv rehash \ | ||
&& pyenv global "${PYTHON_VERSION}" | ||
|
||
WORKDIR /code/rchem | ||
COPY requirements.txt requirements.txt | ||
# hadolint ignore=DL3013 | ||
RUN python -m venv ${HOME}/venv \ | ||
&& . "${HOME}"/venv/bin/activate \ | ||
&& python -m pip install --no-cache-dir -U pip setuptools \ | ||
&& python -m pip install --no-cache-dir -r requirements.txt | ||
|
||
RUN cargo install cargo-tarpaulin | ||
|
||
COPY . . | ||
|
||
ENV LD_LIBRARY_PATH "${PYENV_ROOT}/versions/${PYTHON_VERSION}/lib:${LD_LIBRARY_PATH}" | ||
|
||
RUN \ | ||
--mount=type=cache,target=/code/rchem/target \ | ||
--mount=type=cache,target=/code/rchem/target,sharing=locked \ | ||
cargo tarpaulin --workspace --all-features --out Xml Html \ | ||
&& cargo build --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
basis-set-exchange |