Skip to content

Commit

Permalink
Grouped RUN in Dockerfile (progress for #5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Denperidge committed Jul 28, 2021
1 parent 8cc2060 commit b0c4c13
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b0c4c13

Please sign in to comment.