Skip to content

Instantly share code, notes, and snippets.

Masroor Hasan masroorhasan

View GitHub Profile
View optimized_tf_serving_client.py
#!/usr/bin/env python
from __future__ import print_function
import argparse
import numpy as np
import time
tt = time.time()
import cv2
from grpc.beta import implementations
View etcd_txn_stm.go
package main
import (
"context"
"flag"
"fmt"
"log"
"sync"
"time"
View build_tf_serving.sh
#!/bin/bash
USER=$1
TAG=$2
TF_SERVING_VERSION_GIT_BRANCH="r1.13"
git clone --branch="${TF_SERVING_VERSION_GIT_BRANCH}" https://github.com/tensorflow/serving
TF_SERVING_BUILD_OPTIONS="--copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-msse4.1 --copt=-msse4.2"
cd serving && \
docker build --pull -t $USER/tensorflow-serving-devel:$TAG \
View prediction_service.proto
syntax = "proto3";
package tensorflow.serving;
option cc_enable_arenas = true;
import "protos/tensorflow_serving/apis/predict.proto";
// open source marker; do not remove
// PredictionService provides access to machine-learned models loaded by
// model_servers.
service PredictionService {
View grpc_client_tracing.go
package grpc_client
import (
"github.com/opentracing/opentracing-go"
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
"github.com/grpc-ecosystem/go-grpc-middleware"
"google.golang.org/grpc"
"github.com/masroorhasan/myapp/tracer"
)
View flagger_canary.yaml
apiVersion: flagger.app/v1alpha3
kind: Canary
metadata:
name: resnet-serving
spec:
# deployment reference
targetRef:
apiVersion: apps/v1
kind: Deployment
name: resnet-serving
View resnet_v2_routing.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: resnet-serving
spec:
hosts:
- "*"
gateways:
- resnet-serving-gateway
http:
View resnet_v2_canary.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: resnet-serving
spec:
hosts:
- "*"
gateways:
- resnet-serving-gateway
http:
View resnet_v1_routing.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: resnet-serving
spec:
hosts:
- "*"
gateways:
- resnet-serving-gateway
http:
View resnet_serving_v1.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: resnet-serving
labels:
app: resnet-serving
version: v1
spec:
revisionHistoryLimit: 3
progressDeadlineSeconds: 30
You can’t perform that action at this time.