From c3679f77792062a20fc9781cad4eb9029805167f Mon Sep 17 00:00:00 2001 From: Tianshu Cheng Date: Fri, 13 Sep 2024 14:16:08 -0700 Subject: [PATCH] disable live_reload --- pyproject.toml | 2 +- truss/templates/server.Dockerfile.jinja | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9d9f4ca7b..66c5e2365 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "truss" -version = "0.9.32.dev-34" +version = "0.9.32.dev-35" description = "A seamless bridge from model development to model delivery" license = "MIT" readme = "README.md" diff --git a/truss/templates/server.Dockerfile.jinja b/truss/templates/server.Dockerfile.jinja index 9247841b4..c86e8b996 100644 --- a/truss/templates/server.Dockerfile.jinja +++ b/truss/templates/server.Dockerfile.jinja @@ -26,7 +26,7 @@ COPY ./{{base_server_requirements_filename}} {{base_server_requirements_filename RUN pip install -r {{base_server_requirements_filename}} --no-cache-dir && rm -rf /root/.cache/pip {%- endif %} - {%- if config.live_reload %} + {%- if config.live_reload and not config.docker_server%} RUN $PYTHON_EXECUTABLE -m venv -h >/dev/null \ || { pythonVersion=$(echo $($PYTHON_EXECUTABLE --version) | cut -d" " -f2 | cut -d"." -f1,2) \ && add-apt-repository -y ppa:deadsnakes/ppa \ @@ -81,7 +81,7 @@ COPY ./server /app COPY ./{{ config.model_module_dir }} /app/model {%- endif %} COPY ./config.yaml /app/config.yaml - {%- if config.live_reload %} + {%- if config.live_reload and not config.docker_server%} COPY ./control /control RUN python3 -m venv /control/.env \ && /control/.env/bin/pip3 install -r /control/requirements.txt