-
Notifications
You must be signed in to change notification settings - Fork 19
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
Local model upload to PVC #115
Local model upload to PVC #115
Conversation
789ce27
to
6285490
Compare
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.
Good job so far 👍
pipelines/tekton/azureml-container-pipeline/model-upload/basic-pod.yaml
Outdated
Show resolved
Hide resolved
pipelines/tekton/azureml-container-pipeline/model-upload/Makefile
Outdated
Show resolved
Hide resolved
pipelines/tekton/azureml-container-pipeline/model-upload/basic-pod.yaml
Outdated
Show resolved
Hide resolved
pipelines/tekton/azureml-container-pipeline/model-upload/basic-pod.yaml
Outdated
Show resolved
Hide resolved
pipelines/tekton/azureml-container-pipeline/model-upload/basic-pod.yaml
Outdated
Show resolved
Hide resolved
Also in the A/C in the issue (#87) I specified we should provide a template PVC so please do that eventually. |
How will this work, will it be a template used for the pipelines aswell or just come with this work that you can then add in the pipelineRun? Is the idea to create the PVC and the pod at the same time and upload the model and use this PVC to them use or copy it to somewhere else? My thought was that we just pass a PVC name that is already in the project. |
I added some more detail to the issue yesterday, my bad for it being unclear, #87 (comment) In the issue description I specified how we're probably going to switch to using |
f2b6591
to
737bc9a
Compare
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.
Can you rename the templates file so they are clearly djust to show that they are templates.
local-model-pvc-template.yaml
local-model-to-pvc-pod-template.yaml
pipelines/tekton/azureml-container-pipeline/model-upload/Makefile
Outdated
Show resolved
Hide resolved
- apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: local-model-to-pvc-pod | ||
spec: | ||
volumes: | ||
- name: ${PVC} | ||
persistentVolumeClaim: | ||
claimName: ${PVC} | ||
containers: | ||
- name: local-model-to-pvc-container | ||
image: ubi9 | ||
stdin: true | ||
tty: true | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
volumeMounts: | ||
- mountPath: /workspace/${PVC} | ||
name: ${PVC} |
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 you could consider putting this into the object list of the other template, if they're always expected to be processed together, and the PVC
parameter will always have the same value. WDYT?
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.
The PVC and the pod want to be deleted at different times, this is because when you upload the model file to the PVC it is mounted to the pod. For another pod to mount the PVC the pod we create must un-mount it as you can't have both mounting at the same time.
So when you are deleting them you want to do it separately.
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.
Do we really want to rely on the same PVC being remounted for various uses?
Shouldn't the Pod writing the model to the PV use one PVC, and then Pods consuming the model different PVC(s), possibly with different selectors for labels set by the populating Pod after it has finished storing the model?
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 the pod writing the model does only use one PVC, it is mounted then oc cp
is used and then unmounted and the pod is deleted.
For our usecase the PVC we upload to is then used as a workspace in the pipelines, so the PVC it uses for the pipelines can copy over the model file. So I think adding labels etc. isn't needed for this. (Atleast I don't think so)
pipelines/tekton/azureml-container-pipeline/model-upload/local-model-pvc.yaml
Outdated
Show resolved
Hide resolved
pipelines/tekton/azureml-container-pipeline/model-upload/local-model-to-pvc-pod-template.yaml
Outdated
Show resolved
Hide resolved
pipelines/tekton/azureml-container-pipeline/model-upload/Makefile
Outdated
Show resolved
Hide resolved
pipelines/tekton/build-container-image-pipeline/check-model-and-containerfile-exists.yaml
Outdated
Show resolved
Hide resolved
Please note that the use of |
pipelines/tekton/azureml-container-pipeline/model-upload/local-model-pvc-template.yaml
Show resolved
Hide resolved
pipelines/tekton/azureml-container-pipeline/model-upload/local-model-pvc-template.yaml
Show resolved
Hide resolved
af707e0
to
4829e7b
Compare
4829e7b
to
7c62c86
Compare
ab29662
to
cd2c8d2
Compare
@jackdelahunt It might be a good idea to update the ReadMe file with steps for anyone trying this? Even just the make command and some details about local pvc upload I think might help. |
@biswassri sure will do |
pipelines/tekton/azureml-container-pipeline/model-upload/Makefile
Outdated
Show resolved
Hide resolved
pipelines/tekton/azureml-container-pipeline/model-upload/Makefile
Outdated
Show resolved
Hide resolved
ff724b1
to
194632d
Compare
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.
LGTM, thanks @jackdelahunt!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: grdryn, jackdelahunt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hello @jackdelahunt, was there a specific ready why the Using local models in pipelines documentation section went to the top-level |
…pload Local model upload to PVC
Description
Upload a model to a PVC which can then be used in our pipelines
How Has This Been Tested?
Upload model to PVC:
make MODEL_PATH="PATH_TO_A_FILE" NAME=my-model create
You should get a final output showing details of the upload
You can set the
SIZE
andPVC
values aswellmake MODEL_PATH="PATH_TO_A_FILE" NAME=my-model SIZE=1G PVC=my-new-PVC create
Merge criteria: