Skip to content

Commit

Permalink
docker: split compile image and build image to remove cache (#374)
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
  • Loading branch information
njzjz authored Oct 12, 2023
1 parent ce07725 commit 881fd1b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM python:3.11
FROM python:3.12 AS compile-image

RUN python -m venv /opt/venv
# Make sure we use the virtualenv
ENV PATH="/opt/venv/bin:$PATH"

WORKDIR /data/dpdispatcher
COPY ./ ./
RUN pip install .[bohrium]

FROM python:3.12 AS build-image
COPY --from=compile-image /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
CMD ["/bin/bash"]

0 comments on commit 881fd1b

Please sign in to comment.