-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.default
27 lines (23 loc) · 1.47 KB
/
Dockerfile.default
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM spack/ubuntu-bionic:latest as base
ENV PATH=/opt/spack/bin:$PATH
RUN echo "packages:" > packages.yaml &&\
echo " all:" >> packages.yaml &&\
echo " target: [x86_64]" >> packages.yaml
COPY spack/ /test-packages
RUN apt-get update && apt-get install -y curl python3-botocore python3-boto3 && \
spack repo add /test-packages && \
spack config add -f "packages.yaml" && \
{% for package in packages %}{% for version in package.versions %}spack install --no-checksum --source {% if cache_only %}--cache-only{% endif %} --deprecated {{ package.name }}@{{ version }} && \{% endfor %}{% endfor %}
printf "Finished installation attempts\n"
FROM {% if tester.container %}{{ tester.container }}{% else %}ghcr.io/buildsi/{{ tester.name }}{% endif %}:{% if test.version %}{{ test.version }}{% else %}{{ tester.version }}{% endif %}
COPY --from=base /opt/spack /opt/spack
WORKDIR /build-si/
ENV PATH=/opt/spack/bin:$PATH
COPY {{ test.config_basename }} /build-si/tests.yaml
COPY {{ tester.runscript }} /build-si/{{ tester.runscript }}
{% for bin in bins %}COPY {{ bin }} /usr/local/bin/{{ bin }}
{% endfor %}
RUN apt-get install -y time python3-dev python3-pip && \
pip3 install pytest && \
mkdir -p /results && chmod +x /build-si/{{ tester.runscript }} {% if bins %}{% for bin in bins %} && chmod +x /usr/local/bin/{{ bin }}{% endfor %}{% endif %}
ENTRYPOINT ["{{ tester.entrypoint }}", {% for arg in tester.args %}"{{ arg }}", {% endfor %}"/build-si/{{ tester.runscript }}"]