{% import 'macros/cache.j2' as cache %}

COPY {{ tungstenkit_dir_in_build_ctx.as_posix()}} {{ tungstenkit_dir_in_container.as_posix()}}

RUN {{ cache.mount_pip_cache() }} cd {{ tungstenkit_dir_in_container.as_posix()}} && pip install .

ENTRYPOINT ["/usr/bin/tini","--","python"{% for e in python_entrypoint.split() %},"{{ e }}"{% endfor %}]

LABEL device="{{ device }}"
{% if gpu_mem_gb %}
LABEL gpu_mem_gb="{{ gpu_mem_gb }}"
{% endif %}