-
Notifications
You must be signed in to change notification settings - Fork 191
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 rag kuberay and jupyterhub image #440
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM jupyter/tensorflow-notebook:python-3.10 | ||
COPY requirements.txt ./requirements.txt | ||
RUN pip install --no-cache-dir -r ./requirements.txt |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2023 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# to build, run `gcloud builds submit --config cloudbuild.yaml .` in directory | ||
steps: | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: [ 'pull', 'docker.io/jupyter/tensorflow-notebook:python-3.10' ] | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: [ 'build', '-t', '<Artiact registry repo>/<image name>', '.' ] | ||
images: | ||
- '<Artiact registry repo>/<image name>' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
langchain==0.1.9 | ||
chiayi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ray==2.9.3 | ||
datasets==2.18.0 | ||
sentence-transformers==2.5.1 | ||
kaggle==1.6.6 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,8 @@ resource "helm_release" "jupyterhub" { | |
gcs_bucket = var.gcs_bucket | ||
k8s_service_account = var.workload_identity_service_account | ||
ephemeral_storage = var.ephemeral_storage | ||
notebook_image = "jupyter/tensorflow-notebook" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this meant to be updated with the artifact registry image? |
||
notebook_image_tag = "python-3.10" | ||
}) | ||
] : [templatefile("${path.module}/jupyter_config/config-selfauth.yaml", { | ||
password = var.add_auth ? "dummy" : random_password.generated_password[0].result | ||
|
@@ -135,6 +137,8 @@ resource "helm_release" "jupyterhub" { | |
gcs_bucket = var.gcs_bucket | ||
k8s_service_account = var.workload_identity_service_account | ||
ephemeral_storage = var.ephemeral_storage | ||
notebook_image = "jupyter/tensorflow-notebook" | ||
notebook_image_tag = "python-3.10" | ||
}) | ||
] | ||
depends_on = [module.jupyterhub-workload-identity] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,4 +134,4 @@ variable "ephemeral_storage" { | |
|
||
variable "autopilot_cluster" { | ||
type = bool | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM rayproject/ray:2.9.3-py310-gpu | ||
COPY requirements.txt ./requirements.txt | ||
RUN pip install --no-cache-dir -r ./requirements.txt |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2023 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# to build, run `gcloud builds submit --config cloudbuild.yaml .` in directory | ||
steps: | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: [ 'pull', 'docker.io/rayproject/ray:2.9.3-py310-gpu' ] | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: [ 'build', '-t', '<Artiact registry repo>/<image name>', '.' ] | ||
images: | ||
- '<Artiact registry repo>/<image name>' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
langchain==0.1.9 | ||
transformers==4.38.1 | ||
sentence-transformers==2.5.1 | ||
pyarrow | ||
datasets==2.18.0 | ||
torch==2.0.1 | ||
cloud-sql-python-connector[pg8000]==1.7.0 | ||
SQLAlchemy==2.0.7 | ||
huggingface_hub==0.21.3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,8 @@ resource "helm_release" "ray-cluster" { | |
security_context = local.security_context | ||
secret_name = var.db_secret_name | ||
cloudsql_instance_connection_name = local.cloudsql_instance_connection_name | ||
image_tag = var.enable_gpu ? "2.9.3-py310-gpu" : "2.9.3-py310" | ||
image = var.use_custom_image ? "us-central1-docker.pkg.dev/ai-on-gke/rag-on-gke/ray-image" : "rayproject/ray" | ||
image_tag = var.enable_gpu ? "2.9.3-py310-gpu" : var.use_custom_image ? "2.9.3-py310-gpu" : "2.9.3-py310" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chiayi can we simplify this by also publishing 2.9.3-py310 to artifact registry? Even withput GPUs I think this would benefit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I will work on creating an image for 2.9.3-py310 as well. |
||
resource_requests = var.enable_gpu ? { | ||
"cpu" = "8" | ||
"memory" = "32G" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -239,4 +239,10 @@ variable "members_allowlist" { | |
type = string | ||
default = "" | ||
## keeping it string type to support single field input for marketplace UI. | ||
} | ||
|
||
variable "use_custom_image" { | ||
type = bool | ||
description = "If running RAG, set this var to true to use custome image with pre-installed lib" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This description shouldn't mention RAG, it's a separate variable unrelated to RAG, but we'll set it to true in the RAG deployment |
||
default = false | ||
} |
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 shouldn't hardcode to true, can we define a top-level variable and pass it down?