Skip to content

Instantly share code, notes, and snippets.

View askulkarni2's full-sized avatar
🏗️
Building things that matter.

Apoorva Kulkarni askulkarni2

🏗️
Building things that matter.
View GitHub Profile

EKS Karpenter with G6f Fractional GPU - Complete Setup Guide

Complete configuration for running GPU workloads on AWS EKS with Karpenter v1.8 and G6f fractional GPU instances using multiple NodePools for dynamic instance selection.

Prerequisites

  • EKS cluster (v1.34+) already created
  • kubectl configured to access the cluster
  • helm installed
  • AWS CLI configured
import os
import docx
from datetime import datetime
from multiprocessing import Pool
def extract_paragraphs(args):
docx_file, keywords = args
doc = docx.Document(docx_file)
paragraphs = []
for para in doc.paragraphs:
@askulkarni2
askulkarni2 / efs.sh
Last active February 23, 2023 22:35
EKS Immersion Day - EFS Fix
mkdir ${HOME}/environment/efs_statefulset
cd ${HOME}/environment/efs_statefulset
curl -O https://raw.githubusercontent.com/kubernetes-sigs/aws-efs-csi-driver/master/docs/iam-policy-example.json
EFS_CSI_POLICY_ARN=$(aws iam create-policy --policy-name AmazonEKS_EFS_CSI_Driver_Policy --policy-document file://iam-policy-example.json | jq -r '.Policy.Arn')
echo $EFS_CSI_POLICY_ARN
eksctl create iamserviceaccount \
--cluster eksworkshop-eksctl \
--namespace kube-system \
--name efs-csi-controller-sa \
--attach-policy-arn $EFS_CSI_POLICY_ARN \
@askulkarni2
askulkarni2 / The Technical Interview Cheat Sheet.md
Created May 6, 2018 18:43 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@askulkarni2
askulkarni2 / AWS IAM Policy - ForceMFA.json
Created April 30, 2018 18:18 — forked from incyclum/AWS IAM Policy - ForceMFA.json
AWS IAM Policy - Force MFA - This policy allows users to manage their own passwords and MFA devices but nothing else unless they authenticate with MFA
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllUsersToListAccounts",
"Effect": "Allow",
"Action": [
"iam:ListAccountAliases",
"iam:ListUsers",
"iam:GetAccountPasswordPolicy",
@askulkarni2
askulkarni2 / reinvent-2017-youtube.md
Created December 13, 2017 20:20 — forked from stevenringo/reinvent-2017-youtube.md
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

from __future__ import print_function
import boto3
ec2 = boto3.client('ec2')
ssm = boto3.client('ssm')
tags ={'Key': os.environ['Tagname'], 'Value': os.environ['Tagvalue']}
def find_viable_window ():
#checks if the Tag Key value pair matches with an existing Maintenance Window
wins = ssm.describe_maintenance_windows()['WindowIdentities']
for win in wins:

Keybase proof

I hereby claim:

  • I am askulkarni2 on github.
  • I am askulkarni (https://keybase.io/askulkarni) on keybase.
  • I have a public key ASDhUFR-qOxVXqg8eAnvqiyMEvSGAxasu66UXQ4b6kSnDAo

To claim this, I am signing this object:

@askulkarni2
askulkarni2 / GitHub-Forking.md
Created September 21, 2017 19:34 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@askulkarni2
askulkarni2 / gh-dl-release
Created February 9, 2017 04:47 — forked from maxim/gh-dl-release
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#