Skip to content

Instantly share code, notes, and snippets.

@sub-mod
sub-mod / oshinko-jspark-sc.json
Last active October 20, 2017 18:03
oshinko-jspark-sc.json
{
"apiVersion": "v1",
"kind": "Template",
"labels": {
"application": "oshinko-java-spark",
"createdBy": "template-oshinko-java-build-dc"
},
"metadata": {
"annotations": {
"description": "Create a buildconfig, imagestream and deploymentconfig using source-to-image and java spark source hosted in git",
## Check the GPU model
--------------------------------------
# lspci -nn | grep VGA
00:02.0 VGA compatible controller [0300]: Cirrus Logic GD 5446 [1013:00b8]
00:1e.0 VGA compatible controller [0300]: NVIDIA Corporation GM204GL [Tesla M60] [10de:13f2] (rev a1)
# you might need to do #yum install pciutils
## Check the kernel versions. Not all kernel versions are supported for drivers
-------------------------------------------------------------------------------------
# uname -r
@sub-mod
sub-mod / Openshift-gpu-cuda9-Notes.md
Last active June 8, 2018 07:50
Openshift GPU CUDA9 Setup Notes

Notes for setting up GPU with Openshift

  • Centos7 or RHEL7
  • Openshift 3.7+
  • CUDA9 and CuDNN7

1. Check the GPU model

lspci -nn | grep VGA  
lspci | grep -i --color 'vga\|3d\|2d'
@sub-mod
sub-mod / sample-tfjob-cpu.json
Created January 10, 2018 17:39
Sample tfJob
{
"apiVersion": "tensorflow.org/v1alpha1",
"kind": "TfJob",
"metadata": {
"name": "sample-tfjob"
},
"spec": {
"replicaSpecs": [
{
"template": {
@sub-mod
sub-mod / tf-job-operator.json
Last active February 7, 2018 00:05
TF Job Operator
{
"apiVersion":"v1",
"kind":"Template",
"template":"kubeflow-operator",
"labels":{
"template":"kubeflow-operator"
},
"message":"Kubeflow TfJob Operator",
"metadata":{
"name":"kubeflow-operator",
@sub-mod
sub-mod / sample-distributed-tfjob.json
Created January 10, 2018 17:56
Sample Distributed TfJob
{
"apiVersion": "tensorflow.org/v1alpha1",
"kind": "TfJob",
"metadata": {
"name": "distributed-job"
},
"spec": {
"replicaSpecs": [
{
"replicas": 1,
@sub-mod
sub-mod / Kubeflow-TFJob-operator.md
Last active May 16, 2018 16:41
Kubeflow TFJob operator on Openshift Notes

1) Login as developer and make a Project

oc login -u developer -p developer
oc new-project test

2) Make the SA(tf-job-operator-sa) cluster-admin in the test Namespace

Since CRD & its instance has to be created by cluster-admin we have to make SA a cluster-admin

@sub-mod
sub-mod / tf-cnn.py
Created January 22, 2018 15:28
tf-cnn.py
import os
import sys
import tensorflow as tf
import numpy as np
from tensorflow.python.saved_model import builder as saved_model_builder
from tensorflow.python.saved_model import signature_constants
from tensorflow.python.saved_model import signature_def_utils
from tensorflow.python.saved_model import tag_constants
from tensorflow.python.saved_model import utils
from tensorflow.python.util import compat
@sub-mod
sub-mod / steps.md
Last active October 15, 2018 21:39
Create CRD Object as Project-admin in Openshift

CRD and ClusterRole Both need cluster-admin

Create a CRD ...just the definition as cluster-admin

cat >> crd.yaml << EOF
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: crontabs.stable.example.com
---
apiVersion: v1
data:
jupyterhub_config.py: |
import json
import os
from kubespawner.spawner import KubeSpawner
from jhub_remote_user_authenticator.remote_user_auth import RemoteUserAuthenticator
from oauthenticator.github import GitHubOAuthenticator