Reference 'https://medium.com/@avinchintha/how-to-install-nvidia-drivers-and-cuda-10-0-for-rtx-2080-ti-gpu-on-ubuntu-16-04-18-04-ce32e4edf1c0' with modification
sudo apt-get purge nvidia-*
import random | |
#eg: shuffle_split(80, "xyz.csv") 80= 80% train, 20% Test. xyz.csv= source_file | |
def shuffle_split(train_size, filename): | |
data=open(filename, "r") | |
train1=open("train.csv", "w") | |
test1= open("test.csv", "w") | |
read_data= data.readlines() |
sudo apt-get purge nvidia-*
Reference here
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
# Create SavedModelBuilder class
# defines where the model will be exported
export_path_base = MODEL_PATH
export_path = os.path.join(
tf.compat.as_bytes(export_path_base),
tf.compat.as_bytes(str(VERSION_NUMBER)))
#!/bin/bash | |
tensorflow_model_server --port=8500 --rest_api_port=8501 --model_name=resnet --model_base_path=/models/resnet |
import base64 | |
import requests | |
from datetime import datetime | |
import argparse | |
from tensorflow_serving.apis import predict_pb2 | |
from tensorflow_serving.apis import prediction_service_pb2_grpc | |
import grpc | |
import tensorflow as tf | |
tf_v = 2 |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
# App name | |
name: myresnet-deployment | |
spec: | |
# Creating two pods | |
replicas: 2 | |
template: | |
metadata: |
apiVersion: v1 | |
# service type | |
kind: Service | |
metadata: | |
# Service name | |
labels: | |
run: myresnet-service | |
name: myresnet-service | |
spec: | |
ports: |
[ | |
{ | |
"heroname": "Spirit Breaker", | |
"player": "demon", | |
"mmr": "7624", | |
"link": "https://www.youtube.com/watch?v=Y6XAojzW86o", | |
"published": "2021-04-21 00:00:00", | |
"position": "4" | |
}, | |
{ |
from detectron2.utils.logger import setup_logger | |
from glob import glob | |
setup_logger() | |
import copy | |
from detectron2.evaluation import COCOEvaluator, inference_on_dataset | |
from detectron2.data import build_detection_test_loader | |
from detectron2 import model_zoo | |
from detectron2.config import get_cfg | |
from detectron2.config import CfgNode as CN |