Skip to content

Commit

Permalink
use uv in Dockerfiles (#19990)
Browse files Browse the repository at this point in the history
more using uv for perf improvements 

## How I Tested These Changes
before
```
[2024-02-22T22:59:26Z]  => [4/6] RUN pip install     -e modules/dagster     -e modules/dagster-  58.6s
```

after
```
[2024-02-22T21:20:30Z]  => [4/6] RUN uv pip install     -e modules/dagster     -e modules/dagst  33.8s
``` 
  • Loading branch information
alangenfeld authored Feb 23, 2024
1 parent 059e3cd commit e83a5ef
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ FROM "${BASE_IMAGE}"
ARG DAGSTER_VERSION

COPY build_cache/ /

RUN pip install \
ENV VIRTUAL_ENV=/usr/local
RUN pip install -U uv
RUN uv pip install \
-e dagster \
-e dagster-pipes \
-e dagster-graphql \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ ARG DAGSTER_VERSION

# All packages are hard-pinned to `dagster`, so setting the version on just `DAGSTER` will ensure
# compatible versions.
RUN pip install \
ENV VIRTUAL_ENV=/usr/local
RUN pip install -U uv
RUN uv pip install \
dagster==${DAGSTER_VERSION} \
dagster-azure \
dagster-postgres \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ FROM "${BASE_IMAGE}"
ARG DAGSTER_VERSION

COPY build_cache/ /

RUN pip install \
ENV VIRTUAL_ENV=/usr/local
RUN pip install -U uv
RUN uv pip install \
-e dagster \
-e dagster-pipes \
-e dagster-graphql \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ ARG DAGSTER_VERSION

# All packages are hard-pinned to `dagster`, so setting the version on just `DAGSTER` will ensure
# compatible versions.
RUN pip install \
ENV VIRTUAL_ENV=/usr/local
RUN pip install -U uv
RUN uv pip install \
dagster==${DAGSTER_VERSION} \
dagster-azure \
dagster-postgres \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ ARG DAGSTER_VERSION

# All packages are hard-pinned to `dagster`, so setting the version on just `DAGSTER` will ensure
# compatible versions.
RUN pip install \
ENV VIRTUAL_ENV=/usr/local
RUN pip install -U uv
RUN uv pip install \
dagster==${DAGSTER_VERSION} \
dagster-postgres \
dagster-aws \
Expand Down
6 changes: 3 additions & 3 deletions python_modules/dagster-test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ ENV DAGSTER_DISABLE_TELEMETRY=true
# This makes sure that logs show up immediately instead of being buffered
ENV PYTHONUNBUFFERED=1

RUN pip install --upgrade pip

ENV VIRTUAL_ENV=/usr/local
RUN pip install -U uv
# dagster-celery specified twice to deal with pip resolution in pip 20.3.3 when only
# extras are specified
RUN pip install \
RUN uv pip install \
-e modules/dagster \
-e modules/dagster-graphql \
-e modules/dagster-celery \
Expand Down

0 comments on commit e83a5ef

Please sign in to comment.