Skip to content
Snippets Groups Projects
Commit 09c4fc4f authored by François  LAURENT's avatar François LAURENT
Browse files

Docker image builds 20221005 backend per default

parent 577469ef
No related branches found
No related tags found
No related merge requests found
Pipeline #89935 passed
FROM julia:1.7.3-bullseye
FROM julia:1.8.2-bullseye
ENV DIRNAME app
ARG BRANCH=main
RUN apt-get update && apt-get install -y \
git \
ARG TIMEZONE=UTC
RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/* \
&& git clone --depth 1 --single-branch -b $BRANCH https://gitlab.pasteur.fr/nyx/larvatagger.jl $DIRNAME \
&& julia --project=$DIRNAME -e 'using Pkg; Pkg.instantiate()' \
&& ln -s /$DIRNAME/scripts/larvatagger.jl /bin
# COPY requires at least one file defined, hence `test/precompile.sh`
COPY test/precompile.sh test/data_sample* $DIRNAME/test/
ARG TIMEZONE=UTC
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime \
&& echo $TIMEZONE > /etc/timezone \
&& $DIRNAME/test/precompile.sh --shallow \
&& mv larvatagger.so /lib/ \
&& rm -f $DIRNAME/test/data_sample*
&& ln -s /$DIRNAME/scripts/larvatagger.jl /bin \
&& ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime \
&& echo $TIMEZONE > /etc/timezone
COPY external $DIRNAME/
ARG BACKEND
RUN if [ "$BACKEND" = "MaggotUBA/20220418" ]; then \
apt-get update && apt-get install -y \
python3-pip \
RUN cd $DIRNAME; \
if [ "$BACKEND" = "MaggotUBA/20220418" ]; then \
apt-get update \
&& apt-get install -y python3-pip \
&& python3 -m pip install poetry \
&& cd $DIRNAME \
&& git clone --depth 1 --single-branch -b 20220418 https://gitlab.pasteur.fr/nyx/MaggotUBA-adapter MaggotUBA \
&& cd MaggotUBA \
&& python3 -m poetry remove structured-temporal-convolution \
&& python3 -m poetry add ../structured-temporal-convolution \
&& python3 -m poetry install \
&& cd .. \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*; \
elif [ "$BACKEND" = "MaggotUBA/20221005" ]; then \
apt-get update \
&& apt-get install -y python3-pip \
&& python3 -m pip install poetry \
&& git clone --depth 1 --single-branch -b 20221005 https://gitlab.pasteur.fr/nyx/MaggotUBA-adapter MaggotUBA \
&& cd MaggotUBA \
&& python3 -m poetry remove structured-temporal-convolution \
&& python3 -m poetry add ../structured-temporal-convolution \
&& python3 -m poetry install \
&& python3 -m poetry run python -c 'import julia; julia.install()' \
&& python3 -m poetry run python -c 'from julia.api import Julia; Julia(compiled_modules=False); from julia import Pkg; Pkg.add(url="https://gitlab.pasteur.fr/nyx/planarlarvae.jl", rev="dev"); Pkg.add(url="https://gitlab.pasteur.fr/nyx/TaggingBackends", rev="dev")' \
&& cd .. \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*; \
fi
fi; \
cd ..
ENTRYPOINT ["larvatagger.jl", "--sysimage", "/lib/larvatagger.so"]
ENTRYPOINT ["larvatagger.jl"]
FROM julia:1.7.3-bullseye
FROM julia:1.8.2-bullseye
COPY src /app/src/
COPY scripts /app/scripts/
COPY Project.toml Manifest.toml /app/
RUN apt-get update && apt-get install -y \
git \
RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/* \
&& cd /app \
&& julia --project=. -e 'using Pkg; Pkg.instantiate()' \
ln -s /app/scripts/larvatagger.jl /bin
&& ln -s /app/scripts/larvatagger.jl /bin
ENTRYPOINT ["larvatagger.jl"]
......@@ -17,7 +17,7 @@ while ! [ -z "$1" ]; do
if [ "$1" == "--dev" -o "$1" == "--stable" ]; then
BUILD=$1; shift
elif [ "$1" == "--get-backend" ]; then
DOCKER_ARGS="--build-arg BACKEND=MaggotUBA/20220418 "; shift
DOCKER_ARGS="--build-arg BACKEND=MaggotUBA/20221005 "; shift
cd ./external
if [ -d structured-temporal-convolution ]; then
cd structured-temporal-convolution; git pull; cd ..
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment