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 numpy as np | |
from os import listdir | |
from os.path import isfile, isdir, join | |
import os | |
import json | |
import random | |
import re | |
cwd = os.getcwd() | |
cwd = os.getcwd() |
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 pdb | |
import time | |
import argparse | |
import os | |
import csv | |
import json | |
from urllib.request import urlopen | |
from multiprocessing import Pool | |
import numpy as np |
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
# CALL WITH: | |
import argparse | |
from shared_code.custom_datasets import test_new_stuff | |
parser = argparse.ArgumentParser() | |
parser.add_argument('i', type=int, help='GPU Index') | |
parser.add_arguments('s', type=int, help='dataset size') | |
args = parser.parse_args() |
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 argparse | |
import os | |
import csv | |
import json | |
from urllib.request import urlopen | |
from multiprocessing import Pool | |
import numpy as np | |
parser = argparse.ArgumentParser() |
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
def get_outputs_path(default): | |
try: | |
from polyaxon_helper import get_outputs_path | |
out = get_outputs_path() | |
if out is not None: | |
return out | |
except ImportError: | |
return default |
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/sh | |
apt-get update && apt-get install -y linux-headers-$(uname -r) gcc make | |
rmmod nouveau | |
sh -c "echo \"blacklist nouveau\" >> /etc/modprobe.d/blacklist.conf" | |
update-initramfs -u | |
NVIDIA_DRIVERS_INSTALL_DEST="/usr/local/nvidia" | |
# Create the destination directory and move there | |
mkdir -p "${NVIDIA_DRIVERS_INSTALL_DEST}" | |
cd "${NVIDIA_DRIVERS_INSTALL_DEST}" |
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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: nginx | |
name: nginx | |
spec: | |
template: | |
metadata: | |
labels: |
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: batch/v1 | |
kind: Job | |
metadata: | |
name: nvidia-smi | |
spec: | |
template: | |
metadata: | |
name: nvidia-smi | |
spec: | |
restartPolicy: Never |
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 pykube | |
import os | |
import json | |
def main(): | |
kubeconfig = '/root/.kube/config' | |
if os.path.isfile(kubeconfig): | |
# for using locally | |
api = pykube.HTTPClient( |
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: v1 | |
kind: ConfigMap | |
metadata: | |
name: tf-job-operator-config | |
namespace: default | |
data: | |
controller_config_file.yaml: | | |
accelerators: | |
alpha.kubernetes.io/nvidia-gpu: | |
envVars: |
NewerOlder