Skip to content

Commit

Permalink
removing separate caching step (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
vshulman committed Mar 21, 2024
1 parent eb430c1 commit 4180705
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
2 changes: 0 additions & 2 deletions truss/templates/cache.Dockerfile.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
FROM python:3.11-slim as cache_warmer

RUN mkdir -p /app/model_cache
WORKDIR /app

Expand Down
3 changes: 0 additions & 3 deletions truss/templates/copy_cache_files.Dockerfile.jinja

This file was deleted.

11 changes: 3 additions & 8 deletions truss/templates/server.Dockerfile.jinja
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{%- if model_cache %}
{%- include "cache.Dockerfile.jinja" %}
{%- endif %}

{% extends "base.Dockerfile.jinja" %}

{% block base_image_patch %}
Expand Down Expand Up @@ -51,10 +47,9 @@ RUN pip install -r {{server_requirements_filename}} --no-cache-dir && rm -rf /ro


{% block app_copy %}
{%- if model_cache %}
# Copy data before code for better caching
{%- include "copy_cache_files.Dockerfile.jinja"%}
{%- endif %}
{%- if model_cache %}
{%- include "cache.Dockerfile.jinja" %}
{%- endif %}

{%- if external_data_files %}
{% for url, dst in external_data_files %}
Expand Down

0 comments on commit 4180705

Please sign in to comment.