This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import io | |
from PIL import Image | |
from torchvision import models, transforms | |
from typing import Dict | |
import torch | |
from kserve import Model, ModelServer | |
class AlexNetModel(Model): | |
def __init__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import io | |
from PIL import Image | |
from torchvision import models, transforms | |
from typing import Dict | |
import torch | |
from kserve import Model, ModelServer | |
from ray import serve | |
@serve.deployment(name="custom-model", num_replicas=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: workload.codeflare.dev/v1beta1 | |
kind: AppWrapper | |
metadata: | |
name: hfgputest-1 | |
namespace: default | |
spec: | |
priority: 9 | |
resources: | |
GenericItems: | |
- custompodresources: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: ray.io/v1alpha1 | |
kind: RayCluster | |
metadata: | |
labels: | |
controller-tools.k8s.io: "1.0" | |
# A unique identifier for the head node and workers of this cluster. | |
name: raycluster-complete | |
spec: | |
rayVersion: '2.7.0' | |
# Ray head pod configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
name: mcad-controller-ray-clusterrole | |
rules: | |
- apiGroups: | |
- ray.io | |
resources: | |
- rayclusters | |
- rayclusters/finalizers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright 2022 IBM, Red Hat | |
# | |
# 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 | |
# |