Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update development dockerfiles to use prebuilt extensions #2673

Merged
merged 5 commits into from
Apr 22, 2022

Conversation

akchinSTC
Copy link
Member

@akchinSTC akchinSTC commented Apr 20, 2022

Adds a new container-image-dev target to Makefile
Modifies existing dev dockerfiles to use pre built and packaged extensions.

Fixes #2546

What changes were proposed in this pull request?

How was this pull request tested?

New make target was run and container images and tags verified.
existing non dev targets should remain unaffected and should continue to function during release process.

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@elyra-bot
Copy link

elyra-bot bot commented Apr 20, 2022

Thanks for making a pull request to Elyra!

To try out this branch on binder, follow this link: Binder

@akchinSTC akchinSTC added the component:build build and build related issues(dependencies and docker) label Apr 20, 2022
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My goodness, this is some serious cleanup - very nice!

I just had one comment about capturing the version.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated
Comment on lines 219 to 231
elyra-image-dev:
@mkdir -p build/dev/docker
cp etc/docker/elyra/Dockerfile.dev build/dev/docker/Dockerfile
cp etc/docker/elyra/start-elyra.sh build/dev/docker/start-elyra.sh
cp etc/docker/elyra/requirements.txt build/dev/docker/requirements.txt
cp dist/elyra-$(ELYRA_VERSION)-py3-none-any.whl build/dev/docker/
docker buildx build \
--progress=plain \
--output=type=docker \
--tag docker.io/$(ELYRA_IMAGE) \
--tag quay.io/$(ELYRA_IMAGE) \
--build-arg TAG=$(ELYRA_VERSION) \
build/dev/docker/;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This probably isn't a big deal but thought I'd mention it.)
With these dev targets, if either of the -image-dev targets are invoked when the ELYRA_VERSION is not a .devN version (e.g., 3.8.0), then the image produced by these targets will overwrite the non-dev images. Not sure if its worth adding some kind of detection, like confirm ELYRA_VERSION contains ".dev", prior to proceeding. Since these targets are referenced by container-images-dev and not container-images it probably isn't something to be concerned about. I also haven't looked closely into the differences between the dev and non-dev dockerfiles used by these targets as it could be the case that, when using a released wheel file, the two are essentially equivalent images.

Makefile Outdated
Comment on lines 219 to 231
elyra-image-dev:
@mkdir -p build/dev/docker
cp etc/docker/elyra/Dockerfile.dev build/dev/docker/Dockerfile
cp etc/docker/elyra/start-elyra.sh build/dev/docker/start-elyra.sh
cp etc/docker/elyra/requirements.txt build/dev/docker/requirements.txt
cp dist/elyra-$(ELYRA_VERSION)-py3-none-any.whl build/dev/docker/
docker buildx build \
--progress=plain \
--output=type=docker \
--tag docker.io/$(ELYRA_IMAGE) \
--tag quay.io/$(ELYRA_IMAGE) \
--build-arg TAG=$(ELYRA_VERSION) \
build/dev/docker/;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This probably isn't a big deal but thought I'd mention it.)
With these dev targets, if either of the -image-dev targets are invoked when the ELYRA_VERSION is not a .devN version (e.g., 3.8.0), then the image produced by these targets will overwrite the non-dev images. Not sure if its worth adding some kind of detection, like confirm ELYRA_VERSION contains ".dev", prior to proceeding. Since these targets are referenced by container-images-dev and not container-images it probably isn't something to be concerned about. I also haven't looked closely into the differences between the dev and non-dev dockerfiles used by these targets as it could be the case that, when using a released wheel file, the two are essentially equivalent images.

@lresende
Copy link
Member

Is there a way to use this effort to try to clean up vs adding additional duplication? Now that we are supposedly building proper pre-built images that can be installed, can't we identify the tag name with something like this and remove the duplicated makefile tasks and dockerfile?

@akchinSTC
Copy link
Member Author

akchinSTC commented Apr 22, 2022

Is there a way to use this effort to try to clean up vs adding additional duplication? Now that we are supposedly building proper pre-built images that can be installed, can't we identify the tag name with something like this and remove the duplicated makefile tasks and dockerfile?

@lresende - done

@lresende
Copy link
Member

Thanks, @akchinSTC, this looks a lot cleaner. I can give it a try on the functionality over the weekend but otherwise looks good.

@akchinSTC akchinSTC merged commit 5c8399c into elyra-ai:master Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:build build and build related issues(dependencies and docker)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reduce size of dev Dockerfiles using prebuilt extensions
3 participants