-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(#9): finish multi-stage Dockerfile
- Loading branch information
1 parent
21a85db
commit 77b76fc
Showing
1 changed file
with
5 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |