-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Clingo Concretizer Doesn't Respect Custom Install Tree #22294
Copy link
Copy link
Closed
Labels
bootstrapAnything that has to do with Spack building its own dependencies.Anything that has to do with Spack building its own dependencies.bugSomething isn't workingSomething isn't workingconcretizationimpact-medium
Description
I ran spack containerize with the following spack environment file and when building the resulting Dockerfile spack continued to install software into /opt/spack/var/spack instead of the set install path which results in an empty container being produced. Setting the concretizer to original fixes the issue. Cc'ing @vsoch.
spack:
specs: wget
view: true
config:
concretizer: clingo
container:
os_packages:
build:
- python3-dev
strip: falseDockerfile
# Build stage with Spack pre-installed and ready to be used
FROM spack/ubuntu-bionic:latest as builder
# Install OS packages needed to build the software
RUN apt-get -yqq update && apt-get -yqq upgrade \
&& apt-get -yqq install python3-dev \
&& rm -rf /var/lib/apt/lists/*
# What we want to install and how we want to install it
# is specified in a manifest file (spack.yaml)
RUN mkdir /opt/spack-environment \
&& (echo "spack:" \
&& echo " specs:" \
&& echo " - wget" \
&& echo " view: /opt/view" \
&& echo " config:" \
&& echo " concretizer: clingo" \
&& echo " install_tree: /opt/software" \
&& echo " concretization: together") > /opt/spack-environment/spack.yaml
# Install the software, remove unnecessary deps
RUN cd /opt/spack-environment && spack env activate . && spack install --fail-fast && spack gc -y
# Modifications to the environment that are necessary to run
RUN cd /opt/spack-environment && \
spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh
# Bare OS image to run the installed executables
FROM ubuntu:18.04
COPY --from=builder /opt/spack-environment /opt/spack-environment
COPY --from=builder /opt/software /opt/software
COPY --from=builder /opt/view /opt/view
COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/profile.d/z10_spack_environment.sh
ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l", "-c"]Steps to reproduce the issue
$ spack containerize
$ docker run build -t wget .Information on your system
- Spack: 0.16.1
- Python: 3.6.9
- Platform: linux-ubuntu18.04-skylake
- Concretizer: clingo
Additional information
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have searched the issues of this repo and believe this is not a duplicate
- I have run the failing commands in debug mode and reported the output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bootstrapAnything that has to do with Spack building its own dependencies.Anything that has to do with Spack building its own dependencies.bugSomething isn't workingSomething isn't workingconcretizationimpact-medium