Skip to content

Commit

Permalink
Unify dependencies in agent image (flyteorg#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 <eapolinario@users.noreply.github.com>

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

Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>

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

Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>

* 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 <eapolinario@users.noreply.github.com>

---------

Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Co-authored-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
  • Loading branch information
2 people authored and shuyingliang committed Dec 20, 2024
1 parent 86c5a91 commit 3d74ba8
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,14 +8,15 @@ 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-k8sdataservice==flytekitplugins-k8sdataservice \
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 3d74ba8

Please sign in to comment.