2019-06-22 13:26:23 -05:00
|
|
|
{% macro install_debian_packages(packages) -%}
|
|
|
|
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
|
|
|
|
{%- for deb in packages %}
|
|
|
|
dpkg_apt /debs/{{ deb }} {%- if not loop.last %} && \ {%- endif %}
|
|
|
|
{%- endfor %}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{% macro install_python_wheels(packages) -%}
|
|
|
|
RUN cd /python-wheels/ && pip install {{ packages | join(' ') }}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
2020-05-14 12:23:37 -05:00
|
|
|
{% macro install_python3_wheels(packages) -%}
|
|
|
|
RUN cd /python-wheels/ && pip3 install {{ packages | join(' ') }}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
{% macro copy_files(prefix, files, dest) -%}
|
|
|
|
COPY \
|
|
|
|
{%- for file in files %}
|
|
|
|
{{ prefix }}/{{ file }} \
|
|
|
|
{%- endfor %}
|
|
|
|
{{ dest }}
|
|
|
|
{%- endmacro %}
|