Skip to content

Instantly share code, notes, and snippets.

View sevenEng's full-sized avatar
🤔

Qi Li sevenEng

🤔
  • Mountain View, California
View GitHub Profile
#include <torch/csrc/inductor/aoti_include/cuda.h>
#include <torch/csrc/inductor/aoti_include/cpu.h>
// Definition of AOTI runtime interface functions
#include <torch/csrc/inductor/aoti_runtime/interface.h>
#include <torch/csrc/inductor/aoti_runtime/model_container.h>
#include <iostream>
#include <vector>
#include <torch/csrc/inductor/aoti_include/cuda.h>
#include <torch/csrc/inductor/aoti_include/cpu.h>
// Definition of AOTI runtime interface functions
#include <torch/csrc/inductor/aoti_runtime/interface.h>
#include <torch/csrc/inductor/aoti_runtime/model_container.h>
#include <iostream>
#include <vector>
@sevenEng
sevenEng / ccr.md
Last active October 12, 2017 10:03
Concurrent and Distributed Systems
  • MRSW monitor implementation
  • reentrancy of java intrinsic locks
  • java: go to the highest-possible-level primitives to do the work
@sevenEng
sevenEng / TODO.md
Last active October 18, 2017 17:43

28 Sep

  • modify bridge about env DATABOX_SYSNET
  • dockerize bridge
  • test on twitter-sentiment os-monitor
  • bridge-helper.js createNetwork when duplicate, return existed (maybe)

29 Sep

  • collect all comm parties and let CM call on bridge to enable all these
  • logging about fake IP pool (de-)population

using scenario

app ----- bridge ----- store

Each component(app,driver,store) resides on a network on which there are only bridge and the component.

Policies inside bridge are configured through a REST service, for now /connect and /disconnect, which accepts a pair of container names. Inside the bridge, these names will be resolved using local resolver(127.0.0.11), and ip traffic will be filtered accordingly.

  • vpnkit approach
#!/bin/sh
set_up()
{
set -x
docker network create br-app
docker network create br-store
#bridge container, named br

Use an existed private key inside a dev container (unikernel/mirage:latest in this case):

  • Not quite working:
eval $(ssh-agent)
ssh-add ~/.ssh/id_rsa

ssh-add gives: Could not open a connection to your authentication agent

  • Instead:
const Docker = require('dockerode');
const util = require('util');
var docker = new Docker ();
var printObj = (obj) => {
console.log(util.inspect(obj, false, null));
};
var printNameId = (net) => {
(setq-default indicate-empty-lines t)
(setq make-backup-files nil)
(setq column-number-mode t)
(setq-default show-trailing-whitespace t)
;; tuareg
(load "/home/opam/.opam/4.04.0/share/emacs/site-lisp/tuareg-site-file")
;; merlin
(let ((opam-share (ignore-errors (car (process-lines "opam" "config" "var" "share")))))