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: false
Dockerfile
# 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 ran spack containerize with the following spack environment file and when building the resulting Dockerfile spack continued to install software into
/opt/spack/var/spackinstead of the set install path which results in an empty container being produced. Setting the concretizer tooriginalfixes the issue. Cc'ing @vsoch.Dockerfile
Steps to reproduce the issue
Information on your system
Additional information
spack debug reportand reported the version of Spack/Python/Platform