From b0c4c137bb2b40e30b6a9304e89c0ca87ad4fb7b Mon Sep 17 00:00:00 2001 From: Denperidge Date: Wed, 28 Jul 2021 16:32:06 +0200 Subject: [PATCH] Grouped RUN in Dockerfile (progress for #5) --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 766b0ff..c9801de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,20 @@ FROM ruby + +# Copy the requirements.txt first, as it'll be used for pip install +COPY requirements.txt . + # Install python3 and pip for the API, and ruby for anystyle-cli RUN apt-get update -y && apt-get upgrade -y && \ - apt-get install -y python3 python3-pip -RUN gem install anystyle-cli + apt-get install -y python3 python3-pip && \ + gem install anystyle-cli && \ + pip3 install -r requirements.txt -COPY requirements.txt . COPY app/ /app COPY model/ /app/model COPY grobid_client/ /app/grobid_client # In Docker, use a different JSON file (hostname then gets changed to Docker container name) COPY docker-config.json /app/grobid_client/config.json -RUN pip3 install -r requirements.txt - # Flask is currently always configured for development settings ENV FLASK_APP=a.py ENV FLASK_ENV=development