Skip to content

Commit

Permalink
Unify dependencies in agent image (#3008)
Browse files Browse the repository at this point in the history
* Install all flyteagent image dependencies in a single command

Signed-off-by: Eduardo Apolinario <[email protected]>

* test - Can I run docker commands in gh workflows?

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove `-it` flag from `docker run`

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove quick test after confirming that running `docker run --rm ghcr.io/flyteorg/flyteagent:1.14.0 pyflyte serve agent --port 8000 --timeout 1` in a gh workflow works

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario and eapolinario authored Dec 17, 2024
1 parent 5ae1fbc commit b3428e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ jobs:
file: ./Dockerfile.agent
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Confirm Agent can start
run: |
docker run --rm ghcr.io/${{ github.repository_owner }}/flyteagent:${{ github.sha }} pyflyte serve agent --port 8000 --timeout 1
- name: Push flyteagent-all Image to GitHub Registry
uses: docker/build-push-action@v2
with:
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.agent
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ ARG VERSION
RUN apt-get update && apt-get install build-essential -y \
&& pip install uv

RUN uv pip install --system prometheus-client grpcio-health-checking
RUN uv pip install --system --no-cache-dir -U flytekit==$VERSION \
flytekitplugins-airflow==$VERSION \
flytekitplugins-bigquery==$VERSION \
flytekitplugins-openai==$VERSION \
flytekitplugins-snowflake==$VERSION \
flytekitplugins-awssagemaker==$VERSION \
prometheus-client \
grpcio-health-checking \
&& apt-get clean autoclean \
&& apt-get autoremove --yes \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ \
Expand Down

0 comments on commit b3428e7

Please sign in to comment.