-
Notifications
You must be signed in to change notification settings - Fork 617
Publish dev container #1888
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
Publish dev container #1888
Conversation
|
I am looking at the compressed size of devel image TF vs TFA: https://hub.docker.com/r/tensorflow/tensorflow/tags The TF CPU devel is 1/3 of our devel image and we have 1GB of compressed overhead over tensorflow GPU devel (uncompressed our is 9.2GB). |
|
I think it could be useful to have a default small size 1GB image to lower the download overhead but I think that is still not possible to handle multiple configuration (GPU/CPU) in the dev-containers microsoft/vscode-remote-release#2143 (comment). The new devcontainer support PR is at microsoft/vscode-dev-containers#347 |
|
Could you add |
|
If you could set the alias also for |
As discussed offline this is a consequence of tensorflow/tensorflow#38352 . There is not much we can do without deviating from the custom-op recommended images. |
Sure, but could you expand on why its needed. All of our documentation uses gcc and nvcc to compile. I know there was work on getting TF to compile using cuda-clang but not sure if we want to encourage that? |
|
I've not checked in detail where we use what but I was thinking as a general rule to not going to ovveride to much settings properties in vsocde devcontainer about specific strings or to monitor if we change clang version cause there we are on another repository. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I think that we need to update a little bit https://github.com/tensorflow/addons/blob/master/CONTRIBUTING.md after merging this. Can you open a ticket as a reminder? |
This comment has been minimized.
This comment has been minimized.
| @@ -0,0 +1,25 @@ | |||
| #syntax=docker/dockerfile:1.1.5-experimental | |||
| FROM tensorflow/tensorflow:2.1.0-custom-op-ubuntu16 as dev_container_cpu | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you lost the build ARGS to prepare the switch between cpu and gpu that was in https://github.com/seanpmorgan/addons/pull/14/files#diff-76fe3c36c889ccfcf62f6e35439d030fR3-R5
|
|
||
| set -x -e | ||
|
|
||
| DOCKER_BUILDKIT=1 docker build \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could duplicate this command with the build_args to publish the GPU image. See the ARGS comment below.
| set -e -x | ||
| docker login --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PW }} | ||
| bash bash .github/workflows/github_build_dev_container.sh | ||
| docker push tfaddons/dev_container:latest-cpu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could duplicate this command to push the latest without suffixes (that is the GPU image)
|
As a reminder if you merge #1808 you need to add the requirements here. |
|
|
||
| Compile the custom ops | ||
| ``` | ||
| export TF_NEED_CUDA=1 # If GPU is to be used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we need to set this only in the GPU image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but also if it's built from source locally.
|
|
# Conflicts: # CONTRIBUTING.md
|
@bhack @tensorflow/sig-addons-maintainers so there are still a few sharp edges here, but it aligns with the recent merge of SIG-IO: I would prefer that we merge this semi-hardcoded cpu devel build and then I'll open an issue and start work on a seperate GPU build. This got a bit stale and it'd be easier to get this merged and then upgrade it IMO. Also waiting for clarity from SIG-Build about custom-op images and their future. Does that seem okay? |
* Add dev container build * Add docker upload on commit push * Modify pre-commit to work in dev container
Closes #1414
Discussion Points:
I tested the image in VScode using a dev-container and it worked as expected.