-
Notifications
You must be signed in to change notification settings - Fork 41
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
Blog for running gpu based functions on Fission #271
Conversation
✅ Deploy Preview for fission-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
General:
Specific:
|
Signed-off-by: Md Soharab Ansari <[email protected]>
Signed-off-by: Md Soharab Ansari <[email protected]>
Signed-off-by: Md Soharab Ansari <[email protected]>
Signed-off-by: Md Soharab Ansari <[email protected]>
f186536
to
900c720
Compare
Signed-off-by: Sanket <[email protected]>
Signed-off-by: Sanket <[email protected]>
Create a function using the package, notice are passing `sentiment.main` as entrypoint. | ||
|
||
```bash | ||
$ fission fn create --name sentiment-fn --pkg sentiment-pkg --entrypoint "sentiment.main" |
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.
Environment reference is missing here.
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.
Package is already associated with an environment.
``` | ||
|
||
- The `fission env create` command will create two deployments. One deployment named `poolmgr-python-default-*` for environment and another for builder named `python-*`. | ||
- Edit the environment deployment and add GPU resources to `python` environment container. |
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 we provide the Kubectl edit command here?
Also, if we can do this via kubectl patch
that would be easy to consume for the reader.
Signed-off-by: Md Soharab Ansari <[email protected]>
- Patch the environment deployment to add GPU resources to `python` environment container and set `nodeSelector` to schedule pods on a GPU node using `kubectl patch` command. | ||
|
||
```bash | ||
kubectl patch deployment poolmgr-python-default-5560759 -p '{"spec": {"template": {"spec":{"containers":[{"name":"python","resources": {"limits": {"nvidia.com/gpu": "1"}, "requests": {"nvidia.com/gpu": "1"}}}]}}}}' |
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.
Please consider patching environment spec. Not deployment.
User should not change fissions internal object.
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.
@sanketsudake Patching the resources is working via environment spec but nodeSelector patch is not working.
Seeing this error.
Error: error applying specs: environment apply failed: Environment.fission.io "pytorch" is invalid: spec.runtime.podspec.containers: Required value
apiVersion: fission.io/v1
kind: Environment
metadata:
creationTimestamp: null
name: pytorch
spec:
builder:
command: build
container:
name: ""
resources: {}
image: ghcr.io/fission/python-builder
imagepullsecret: ""
keeparchive: false
poolsize: 1
resources:
requests:
nvidia.com/gpu: "1"
limits:
nvidia.com/gpu: "1"
runtime:
container:
name: ""
resources: {}
image: ghcr.io/fission/python-env
podSpec:
nodeSelector:
kubernetes.io/hostname: "gpu-node03"
version: 3
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.
So typically you need to have container name same environment. As we have two containers in pod
- runtime and fetcher
containers is required field https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#podspec-v1-core
Probably we can skip node selector part in blog post. only keep resources requests.
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.
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.
Skipping the node selector part.
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 please update blog accordingly
Signed-off-by: Md Soharab Ansari <[email protected]>
No description provided.