Skip to content

Commit

Permalink
Use caching for pip
Browse files Browse the repository at this point in the history
  • Loading branch information
hbruch committed Nov 30, 2023
1 parent eefcb19 commit 85ef7e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dagster.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# syntax = docker/dockerfile:1
# Dagster libraries to run both dagit and the dagster-daemon. Does not
# need to have access to any pipeline code.

FROM python:3.11 AS base

COPY requirements-dagster.txt ./requirements-dagster.txt
RUN pip install -r requirements-dagster.txt
RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements-dagster.txt

ARG DAGSTER_HOME=/opt/dagster/dagster_home/
ENV DAGSTER_HOME=$DAGSTER_HOME
Expand Down
4 changes: 3 additions & 1 deletion pipeline.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# syntax = docker/dockerfile:1
FROM python:3.11

LABEL org.opencontainers.image.title="data pipeline API"
Expand All @@ -17,7 +18,8 @@ RUN apt update && apt install -y \
COPY requirements-pipeline.txt /opt/dagster/app

# Install requirements
RUN pip install -r requirements-pipeline.txt
RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements-pipeline.txt

# Add repository code
COPY pipeline/ /opt/dagster/app/pipeline/
Expand Down

0 comments on commit 85ef7e2

Please sign in to comment.