Skip to content

Instantly share code, notes, and snippets.

View ontheklaud's full-sized avatar
😪

Seungkyun Hong ontheklaud

😪
View GitHub Profile
@ontheklaud
ontheklaud / install-accessories-centos7.sh
Created November 6, 2018 14:53
Non-root guide for installing unix accessories for CentOS 7
# Screen (screen-4.6.2)
wget https://ftp.gnu.org/gnu/screen/screen-4.6.2.tar.gz
tar -xf <>
./autogen.sh
./configure --prefix=${HOME}/opt/screen-4.6.2
make && make install
# Ncurses (ncurses-6.1) / for Htop
wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz
tar -xf <>
@ontheklaud
ontheklaud / gist:f3a993b40fb45e45acb1f7a2507a1d2f
Last active March 19, 2019 09:00
TensorFlow r1.12rc2 build
# GCC 8.2.0 build
# References:
# https://gcc.gnu.org/install/configure.html
# http://luiarthur.github.io/gccinstall
tar xzf gcc-8.2.0.tar.gz
cd gcc-8.2.0
# edit <./contrib/download_prerequisites>, from ftp:// to http://
./contrib/download_prerequisites
cd ..
mkdir objdir
@ontheklaud
ontheklaud / build_intel_tensorflow.sh
Last active October 28, 2018 14:33
Build optimized TensorFlow with Intel acceleration
# reference for intel python repository
# https://software.intel.com/en-us/articles/using-intel-distribution-for-python-with-anaconda
conda config --add channels intel
conda create -n mkldnn -c conda-forge intelpython3_core python=3.6 cartopy numpy matplotlib scipy opencv cython seaborn pandas geopy scikit-learn scikit-image netcdf4 h5py
# reference for keras module dependency:
# https://github.com/tensorflow/tensorflow/issues/21518#issuecomment-411875069
pip install keras_applications keras_preprocessing
@ontheklaud
ontheklaud / build_tensorflow_from_src.sh
Last active November 2, 2018 09:05
Bazelbuild commands for TensorFlow Build
#!/bin/bash
# for CUDA acceleration,
bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
# for Intel MKL acceleration,
bazel build --config=opt --config=mkl //tensorflow/tools/pip_package:build_pip_package
bazel --server_javabase=$HOME/opt/jdk build --config=opt --config=mkl //tensorflow/tools/pip_package:build_pip_package
# for TensorFlow r1.11 w/ Intel nGraph acceleration,
@ontheklaud
ontheklaud / resolve-java-cacerts.sh
Last active June 10, 2019 04:09
Resolve untrusted middle SSL server connection for Java environment (especially bazelbuild)
# get latest OpenJDK (10 at here)
# from: http://jdk.java.net/10/
#
# Example (OpenJDK 10-10.0.2 / GA)
# https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_linux-x64_bin.tar.gz
# 0. Extract openjdk into shared directory
# sudo if needed
tar -xf <openjdk>.tar.gz -C /usr/local
@ontheklaud
ontheklaud / prep-gitkraken-c7.sh
Created September 13, 2018 00:09
Prerequisite for Using GitKraken in CentOS 7
#!/bin/bash
# GitKraken refers library named libcurl. For bare execution, it gives an error of library not found.
# libcurl-gnutls.so.4: cannot open shared object file: No such file or directory
#
# However, your C7 installation may already have libcurl installation.
# Try,
sudo yum -y install libcurl
# You may see: Package libcurl-7.29.0-46.el7.x86_64 already installed and latest version
# Also, libcurl-so.4 is located in /usr/lib64/libcurl.so.4
@ontheklaud
ontheklaud / install-custom-rootca-on-qnap.sh
Created September 7, 2018 01:22
Installation of custom Root CA Certificate on QNAP (Debian)
# Tested on QNAP TVS-1282T3
# connect to NAS thru SSH (ssh -p <port> admin@<NAS IP>)
ROOTCA=<custom-rootca>.crt
cp /share/NFSv\=4/<somewhere>/<custom-rootca>.crt /usr/certs
ln -s /usr/certs/$ROOTCA /usr/certs/`openssl x509 -hash -noout -in /usr/certs/$ROOTCA`.0
@ontheklaud
ontheklaud / install-amdgpu-pro-on-centos7.sh
Created August 29, 2018 05:53
Such a painful steps for Radeon Pro to get to work on CentOS 7.5
#!/bin/bash
# Prerequisite
# OS: CentOS 7.5.1804 installation with 'minimal install' config
# 1. download most recent amdgpu-pro (currently 18.30)
# You can find binaries at: https://www.amd.com/en/support/kb/release-notes/rn-prorad-lin-18-30 (almost impossible to discover)
wget --referer http://support.amd.com https://www2.ati.com/drivers/linux/rhel7/amdgpu-pro-18.30-641594.tar.xz
tar -xf amdgpu-pro-18.30-641594.tar.xz
cd amdgpu-pro-18.30-641594
@ontheklaud
ontheklaud / install-snapper-on-centos7.sh
Created August 29, 2018 01:00
Snapper (Filesystem Snapshot Helper) Installation for CentOS 7
#!/bin/bash
# Prerequisite:
# OS: CentOS 7.5.1804 installation with 'minimal install'
# Filesystem: LVM Thin-provisioning of root (/) with lvm(xfs).
# 0. enable EPEL-Release Repo
sudo yum -y install epel-release
# 1. install snapper (dependencies may follow)
@ontheklaud
ontheklaud / get-caffe-deps-thru-conda.sh
Last active August 22, 2018 13:54
Caffe bootstrap script for CentOS 7/Anaconda3 Python & Conda
#!/bin/bash
# Conda already have MKL
conda update mkl
# CMAKE, Boost
conda install -y cmake boost libboost
# OpenCV, Protobuf
conda install -y opencv libopencv protobuf libprotobuf snappy