Skip to content

Commit

Permalink
Simpler dev images (flyteorg#2243)
Browse files Browse the repository at this point in the history
  • Loading branch information
eapolinario authored Mar 6, 2024
1 parent cacb9f0 commit 632b2c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ LABEL org.opencontainers.image.source=https://github.com/flyteorg/flytekit
WORKDIR /root
ENV FLYTE_SDK_RICH_TRACEBACKS 0

ARG VERSION
# Flytekit version of flytekit to be installed in the image
ARG PSEUDO_VERSION

COPY . /flytekit

Expand All @@ -28,8 +29,8 @@ COPY . /flytekit
# 3. Clean up the apt cache to reduce image size. Reference: https://gist.github.com/marvell/7c812736565928e602c4
# 4. Create a non-root user 'flytekit' and set appropriate permissions for directories.
RUN apt-get update && apt-get install build-essential vim libmagic1 git -y \
&& pip install "git+https://github.com/flyteorg/flyte.git@master#subdirectory=flyteidl" \
&& pip install --no-cache-dir -U --pre \
&& SETUPTOOLS_SCM_PRETEND_VERSION_FOR_FLYTEKIT=$PSEUDO_VERSION pip install --no-cache-dir -U \
"git+https://github.com/flyteorg/flyte.git@master#subdirectory=flyteidl" \
-e /flytekit \
-e /flytekit/plugins/flytekit-k8s-pod \
-e /flytekit/plugins/flytekit-deck-standard \
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,11 @@ requirements: doc-requirements.txt ${MOCK_FLYTE_REPO}/requirements.txt ## Compil
coverage:
coverage run -m pytest tests/flytekit/unit/core flytekit/types -m "not sandbox_test"
coverage report -m --include="flytekit/core/*,flytekit/types/*"

.PHONY: build-dev
build-dev: export PLATFORM ?= linux/arm64
build-dev: export REGISTRY ?= localhost:30000
build-dev: export PYTHON_VERSION ?= 3.12
build-dev: export PSEUDO_VERSION ?= $(shell python -m setuptools_scm)
build-dev:
docker build --platform ${PLATFORM} --push . -f Dockerfile.dev -t ${REGISTRY}/flytekit:${TAG} --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg PSEUDO_VERSION=${PSEUDO_VERSION}

0 comments on commit 632b2c2

Please sign in to comment.