Skip to content

Commit

Permalink
fix: Use root-binaries conda-forge package as build base (#5)
Browse files Browse the repository at this point in the history
* Base build around conda-forge 'root-binaries' to get ROOT runtime
* Add checks to build CI for ROOT, hist2workspace, and common utilities
  • Loading branch information
matthewfeickert authored Mar 16, 2020
1 parent d7e3ad6 commit f2c5744
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
--tag pyhf/pyhf-validation-root-base:$GITHUB_SHA \
--compress
docker images
- name: Check PATH
run: |
docker run --rm pyhf/pyhf-validation-root-base:$GITHUB_SHA -c "which python;python --version;which root;root-config --version;hist2workspace --help"
docker run --rm pyhf/pyhf-validation-root-base:$GITHUB_SHA -c "which curl;which tar"
- name: Run tests
run: |
docker run --rm -v $PWD:$PWD -w $PWD pyhf/pyhf-validation-root-base:$GITHUB_SHA -c "python tests/rf308_normintegration2d.py"
Expand Down
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ RUN conda config --add channels conda-forge && \
conda config --set allow_softlinks false && \
conda config --set always_copy true
RUN conda create --yes --quiet -p /opt/condaenv \
"root_base=$ROOT_VERSION" \
"root-binaries=$ROOT_VERSION" \
"python=$PYTHON_VERSION"
# Forcibly remove some packages to make the final image smaller
# c.f. https://github.com/conda-forge/root-feedstock/blob/master/recipe/meta.yaml
RUN eval "$(python -m conda shell.bash hook)" && \
conda activate /opt/condaenv && \
conda install -y \
libblas \
libcblas \
fftw \
zlib
conda remove --yes --force-remove \
pythia8 \
qt \
libllvm9 \
libclang \
pandoc \
xrootd
RUN rm -rf /opt/condaenv/tutorials /opt/condaenv/ui5

FROM base
Expand Down

0 comments on commit f2c5744

Please sign in to comment.