Skip to content

Commit

Permalink
Use uv when installing requirements for canary-deployer
Browse files Browse the repository at this point in the history
mortenlj committed Oct 28, 2024
1 parent 18fceac commit 1414145
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -66,13 +66,17 @@ docker-canary:
ARG VERSION=$EARTHLY_GIT_SHORT_HASH
SAVE IMAGE --push ${canary_image}:${VERSION} ${canary_image}:latest

uv-provider:
FROM ghcr.io/astral-sh/uv:latest
SAVE ARTIFACT /uv

docker-canary-deployer:
FROM ghcr.io/nais/deploy/deploy:latest
WORKDIR /canary/
COPY +uv-provider/uv /usr/local/bin/
COPY canary-deployer/requirements.txt /canary/
RUN apk add python3 && \
python3 -m ensurepip && \
pip3 install -r /canary/requirements.txt
/usr/local/bin/uv pip install --system --requirement /canary/requirements.txt
COPY canary-deployer/*.yaml /canary/
COPY canary-deployer/deployer.py /canary/
RUN python3 -c "import deployer" ## Minimal testing that imports actually work

0 comments on commit 1414145

Please sign in to comment.