Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
-
Install Homebrew The Missing Package Manager for macOS (or Linux) — Homebrew
-
Download Miniforge3
-
Install Miniforge3 and restart your terminal as soon as the installation finishes:
Wrong version (1.10.2) gets installed for me when I run conda install pytorch -c pytorch-nightly
.
To fix, install the latest pytorch version from the stable channel, then manually download package
for your python version, and install it over the current pytorch. Newest Pytorch Nightly releases here:
Anaconda: Pytorch Nightly Files.
from detectron2.engine.hooks import HookBase | |
from detectron2.evaluation import inference_context | |
from detectron2.utils.logger import log_every_n_seconds | |
from detectron2.data import DatasetMapper, build_detection_test_loader | |
import detectron2.utils.comm as comm | |
import torch | |
import time | |
import datetime | |
class LossEvalHook(HookBase): |
import flask | |
from flask_cors import CORS | |
from flask import request, jsonify | |
from detectron2.engine import DefaultPredictor | |
from detectron2.config import get_cfg | |
from detectron2.data import MetadataCatalog | |
import cv2 | |
import requests | |
import numpy as np |
## Create the virtual environment | |
conda create -n 'environment_name' | |
## Activate the virtual environment | |
conda activate 'environment_name' | |
## Make sure that ipykernel is installed | |
pip install --user ipykernel | |
## Add the new virtual environment to Jupyter |
I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.
Here is what I had messed up, which you also probably did:
- I had too many different python interpreters
- Too many different symlinks which I lost track of
- almost no package I installed with pip worked without a headache
- any attempt to fix using online resources made it worse.
To prepare for the Docker 101 workshop, please install Docker and follow the steps in creating a Dockerhub account.
To prepare for the Kubernetes 101 workshop, please install the following:
Verify your minikube install by running the following commands in your terminal:
$ minikube start
and
#!/bin/bash | |
function show_gpu_user { | |
pid=$(pstree -sg $1 | grep -Eo 'bash\([0-9]*\)' | head -1 | grep -Eo '[0-9]*'); | |
docker ps -q | xargs docker inspect --format "{{.Name}} {{.State.Pid}}" | grep $pid | awk '{printf "%-24s", $1}'; | |
ps aux | grep $1 | grep -v grep | awk '{ for(i=1;i<=NF;i++) {if ( i >= 11 ) printf $i" "}; printf "\n" }'; | |
} | |
echo " "; |