Skip to content

Commit

Permalink
fix(#9): finish multi-stage Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasliebe committed Nov 13, 2023
1 parent 21a85db commit 77b76fc
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
# Builder image
FROM ubuntu:latest as builder
LABEL authors="lucasliebe"

FROM continuumio/miniconda3 as builder

RUN apt-get update -y && apt-get install default-jre make wget curl unzip build-essential -y
COPY . /app/unCover

ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && /bin/bash ~/miniconda.sh -b -p $CONDA_DIR
ENV PATH=$CONDA_DIR/bin:$PATH

WORKDIR /app/unCover
RUN conda update conda --yes
RUN conda env create -f environment.yml
RUN cp -n .env.example .env
RUN make -C tem/topic-evolution-model/
RUN conda run -n unCover ./corenlp --no-run && conda run -n unCover ./prepare_models

# Final image
FROM alpine:latest
FROM continuumio/miniconda3
LABEL authors="lucasliebe"

#RUN apt-get update -y && apt-get install default-jre
COPY --from=builder /app/unCover /app/unCover
ENV CONDA_DIR /opt/conda
COPY --from=builder $CONDA_DIR $CONDA_DIR
ENV PATH=$CONDA_DIR/bin:$PATH
COPY --from=builder /app /app
COPY --from=builder /opt/conda /opt/conda

WORKDIR /app/unCover
CMD conda run -n unCover streamlit run main.py

0 comments on commit 77b76fc

Please sign in to comment.