From e9b5b0f800f4a8bc3c3938d1e16ef2268174e9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laurent?= <francois.laurent@posteo.net> Date: Thu, 25 Jul 2024 16:13:31 +0200 Subject: [PATCH] feat: temptative Dockerfile for PasteurJanelia backend --- Project.toml | 2 +- recipes/Dockerfile | 2 +- recipes/Dockerfile.pasteurjanelia | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 recipes/Dockerfile.pasteurjanelia diff --git a/Project.toml b/Project.toml index 7578ac2..115c84b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "LarvaTagger" uuid = "8b3b36f1-dfed-446e-8561-ea19fe966a4d" authors = ["François Laurent", "Institut Pasteur"] -version = "0.18.4" +version = "0.18.5" [deps] Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" diff --git a/recipes/Dockerfile b/recipes/Dockerfile index d32d5f0..6458645 100644 --- a/recipes/Dockerfile +++ b/recipes/Dockerfile @@ -28,7 +28,7 @@ FROM base AS prebuild ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \ PIP_NO_CACHE_DIR=1 \ POETRY_VIRTUALENVS_IN_PROJECT=1 \ - POETRY_VERSION=1.2.0 + POETRY_VERSION=1.8.3 RUN apt-get update \ && apt-get install --no-install-recommends -y python3-dev python3-pip \ diff --git a/recipes/Dockerfile.pasteurjanelia b/recipes/Dockerfile.pasteurjanelia new file mode 100644 index 0000000..43f0edb --- /dev/null +++ b/recipes/Dockerfile.pasteurjanelia @@ -0,0 +1,29 @@ +ARG BASE=latest + +FROM flaur/larvatagger:${BASE} AS prebuild + +ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \ + PIP_NO_CACHE_DIR=1 \ + POETRY_VIRTUALENVS_IN_PROJECT=1 \ + POETRY_VERSION=1.8.3 + +RUN apt-get update \ + && apt-get install --no-install-recommends -y wget \ + && if ! command -v poetry; then \ + apt-get install --no-install-recommends -y python3-dev python3-pip \ + && pip install "poetry==$POETRY_VERSION"; \ + fi \ + && rm -rf /var/lib/apt/lists/* + + +FROM prebuild AS backend + +ARG PROJECT_DIR=/app +ARG BACKEND_BRANCH=main + +RUN cd $PROJECT_DIR \ + && git clone --depth 1 --no-tags --single-branch -b $BACKEND_BRANCH https://gitlab.pasteur.fr/nyx/PasteurJanelia-adapter PasteurJanelia \ + && cd PasteurJanelia \ + && make package \ + && rm -rf .git ~/.cache + -- GitLab