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

Add docker-server and docker-server-pytorch #1602

Merged
merged 7 commits into from
Dec 14, 2021

Conversation

devinrsmith
Copy link
Member

I ran a successful build in my repo - you should be able to pull:

docker pull ghcr.io/devinrsmith/server-pytorch:build-docker-server-pytorch

Note: these are large images.

@@ -22,14 +23,45 @@ dependencies {
// runtimeOnly project(':log-to-logbuffer')
}

application {
distributions {
Copy link
Member

Choose a reason for hiding this comment

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

With the removal of the grpc-api-server-docker, it probably makes sense to move this up to grpc-api-server itself?

I'm content to have this change happen later, probably in the jetty branch where I'm renaming grpc-api to server anyway, and adding jetty vs netty variants, but just want to be sure this makes sense as a plan.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I'd support a rename.

docker/server-pytorch/build.gradle Outdated Show resolved Hide resolved
docker/server-pytorch/src/main/docker/Dockerfile Outdated Show resolved Hide resolved
docker/server/build.gradle Outdated Show resolved Hide resolved
docker/server/build.gradle Outdated Show resolved Hide resolved
### Run

```shell
./gradlew grpc-api-server-native:run
Copy link
Member

Choose a reason for hiding this comment

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

this is still runnable, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

In the way I've got it configured, not via the gradle run. I'll add new instructions on how to run locally.

Copy link
Member

Choose a reason for hiding this comment

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

👍 Jianfeng and I have a short-ish set of steps to make py work from either netty or jetty run locally, without docker.

docker/server-pytorch/build.gradle Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
@niloc132
Copy link
Member

niloc132 commented Dec 3, 2021

I'll follow up with trying to implement this same basic pattern for the web image's contents - breaking it up into "here's an archive with contents that jetty can serve statically" and "here's a docker image based on nginx" will fit well into the work i'm doing.

@niloc132
Copy link
Member

niloc132 commented Dec 7, 2021

  • arch support in bootstrap.properties - and anticipate py vers changes too
  • tagging on upstream images when dhcc ships

file for future work:

  • wheels as gradle artifacts (as i'm doing with js)
  • parameterizing the dockerfiles with upstream names, since commands are the same otherwise

@devinrsmith
Copy link
Member Author

This doesn't have "arch support in bootstrap.properties" - happy to extend support, but I've not tried to build arm64. I'm assuming it may be better as a follow up to get full stack arm64 support?

docker/server/build.gradle Outdated Show resolved Hide resolved
docker/server/build.gradle Outdated Show resolved Hide resolved
stdout.toLogBuffer=true
stderr.toLogBuffer=true

jpy.jpyLib=/usr/local/lib/python3.7/dist-packages/jpy.cpython-37m-x86_64-linux-gnu.so
Copy link
Member

Choose a reason for hiding this comment

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

this file could be modified when copied, such that the arch and py version can be parameterized by a future map.

definitely not requesting that you try arm, just requesting that the arg be made available, plumbed through the gradle/docker barrier so we have one place to change, as long as we're already providing the ability to parameterize the server build.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd actually like to parameterize for architecture first before trying to architecture for python version; and before parameterizing for python version, I think we should work on building up the stack as a virtual environment.

This bootstrap file is meant to aid in just the docker image building process; I expect we'll need to parameterize our native run instructions more explicitly to pick up python.

Copy link
Member

Choose a reason for hiding this comment

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

Parameterizing for arch outside of properties like this is only an extra 1-3 lines in Docker.groovy - with the other images moved out externally (and already building aarch64), this should be the last piece we need to fix.

### Run

```shell
./gradlew grpc-api-server-native:run
Copy link
Member

Choose a reason for hiding this comment

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

👍 Jianfeng and I have a short-ish set of steps to make py work from either netty or jetty run locally, without docker.

docker/server/build.gradle Outdated Show resolved Hide resolved
docker/server/src/main/common/Dockerfile Show resolved Hide resolved
Copy link
Member

@niloc132 niloc132 left a comment

Choose a reason for hiding this comment

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

Approved, with the "file and followup on aarch64 in that properties file" follow-up

Copy link
Member

@JamesXNelson JamesXNelson left a comment

Choose a reason for hiding this comment

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

rubber stamp for the gitlab file; there's one comment that maybe worth deleting, and I'm not uptodate on what crane is doing, but the changes to the file itself look valid.

uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository_owner }}/grpc-api
# grpc-api deprecated
Copy link
Member

Choose a reason for hiding this comment

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

what up w/ this comment?

@devinrsmith devinrsmith merged commit f853ca0 into deephaven:main Dec 14, 2021
@devinrsmith devinrsmith deleted the docker/server-pytorch branch December 14, 2021 19:15
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants