This file contains hidden or 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
#이번에 제 centos7용 docker-ce, nvidia-docker install script가 갑자기 깨져서, 확인중입니다. | |
#내용은 스크린샷처럼 docker-ce와 nvidia-docker2 2.0.3의 dependency관계 때문에 문제가 생겼습니다. | |
#에러는 yum install -y nvidia-docker2 수행중 발생하고, 에러내용은 스크린샷으로 올렸습니다. | |
#제 스크립트 중 설치하는부분만 빼서 보면 아래 내용인데요. | |
sudo bash -e <<EOF | |
yum-config-manager \ | |
--add-repo \ |
This file contains hidden or 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/bash | |
function ensure_privileged_or_exit() | |
{ | |
local cap_lst=$(capsh --decode=00000007ffffffff | cut -d "=" -f2 | tr ',' ' ') | |
for curr_cap in $(capsh --print | grep Current: | cut -d "=" -f2 | tr ',' ' '); do | |
cap_lst=$(echo "$cap_lst" | sed -e "s/$curr_cap//g") | |
done | |
cap_lst=$(echo "$cap_lst" | sed -e "s/ //g") |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<style> | |
.urgent{color:red} | |
.high{color:orange} | |
.normal{color:skyblue} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<img id="a"> | |
<section id="b"></section> | |
<br/> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<img id="a"> | |
<section id="b"></section> | |
<br/> |
This file contains hidden or 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
const Github = class { | |
constructor(id, repo) { | |
this._base = `https://api.github.com/repos/${id}/${repo}/contents/`; | |
} | |
load(path) { | |
return new Promise((res, rej) => { | |
const id = 'callback' + Github._id++; | |
const f = Github[id] = ({data: { content }}) => { | |
delete Github[id]; |
This file contains hidden or 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
#!/usr/bin/python | |
import sys | |
print("sys.version==[{}]".format(sys.version)) |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<section id="data"></section> | |
</body> | |
<script> |
This file contains hidden or 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
#### Docker | |
docker build -t tfn2mt_base -f tfn2mt/Dockerfile.cpu . && docker run --runtime=nvidia -it --rm tfn2mt_base |
This file contains hidden or 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
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) | |
#define LOG_WARN_JYP(str) \ | |
if (WARN <= g_logLevel) { \ | |
LOG_JYP(str) \ | |
}; | |
#define LOG_DEBUG_JYP(str) \ | |
if (DEBUG <= g_logLevel) { \ | |
LOG_JYP(str) \ |