From 6e4ed8781334f28cf842bfd4d494e6a59557c90f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 22 Aug 2023 10:02:08 +0200 Subject: [PATCH] Make Dockerfile layers more efficient --- Dockerfile | 7 ++++--- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index fdb7cf7..51afc6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,6 @@ ARG APP_NAME=verbanote ARG APP_PATH=/verbanote ARG PYTHON_VERSION ARG POETRY_VERSION -ARG VERBANOTE_OUTPUT_PATH=/transcriptions ENV \ PYTHONDONTWRITEBYTECODE=1 \ @@ -26,7 +25,6 @@ ENV PATH="${POETRY_HOME}/bin:${PATH}" WORKDIR ${APP_PATH} COPY ./poetry.lock ./pyproject.toml ./README.md ./ -COPY ./${APP_NAME} ./${APP_NAME} # -------------- @@ -38,13 +36,16 @@ ENV APP_NAME=${APP_NAME} ENV APP_PATH=${APP_PATH} ENV VERBANOTE_OUTPUT_PATH=${VERBANOTE_OUTPUT_PATH} +RUN mkdir -p ${VERBANOTE_OUTPUT_PATH} + WORKDIR ${APP_PATH} RUN poetry install -RUN mkdir -p ${VERBANOTE_OUTPUT_PATH} # installing the large models RUN poetry run ltt install torch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 +COPY ./${APP_NAME} ./${APP_NAME} + COPY ./docker/docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/pyproject.toml b/pyproject.toml index 7b030bb..c5c36ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ version = "0.1.0" description = "" authors = ["Marty Oehme "] readme = "README.md" -packages = [{ include = "verbanote" }] +# packages = [{ include = "verbanote" }] [tool.poetry.dependencies] python = "^3.11"