Skip to content

Instantly share code, notes, and snippets.

View jorgemf's full-sized avatar

Jorge MF jorgemf

View GitHub Profile

Install polyaxon in kubernetes over archlinux

Introduction

This file explains how to install polyaxon in kubernetes over archlinux

Requirements

In /etc/sysctl.d/99-sysctl.conf set:

@jorgemf
jorgemf / build-tensorflow-from-source.md
Created January 24, 2018 01:27 — forked from Brainiarc7/build-tensorflow-from-source.md
Build Tensorflow from source, for better performance

Building Tensorflow from source on Linux for maximum performance:

TensorFlow is now distributed under an Apache v2 open source license on GitHub.

Step 1. Install NVIDIA CUDA:

To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit.

Step 2. Install NVIDIA cuDNN:

@jorgemf
jorgemf / Dockerfile_TFserving_1_6
Last active July 19, 2018 14:07
Dockerfile to compile TensorFlow Serving 1.6 using GPU
# docker build --pull -t tf/tensorflow-serving --label 1.6 -f Dockerfile .
# export TF_SERVING_PORT=9000
# export TF_SERVING_MODEL_PATH=/tf_models/mymodel
# export CONTAINER_NAME=tf_serving_1_6
# CUDA_VISIBLE_DEVICES=0 docker run --runtime=nvidia -it -p $TF_SERVING_PORT:$TF_SERVING_PORT -v $TF_SERVING_MODEL_PATH:/root/tf_model --name $CONTAINER_NAME tf/tensorflow-serving /usr/local/bin/tensorflow_model_server --port=$TF_SERVING_PORT --enable_batching=true --model_base_path=/root/tf_model/
# docker start -ai $CONTAINER_NAME
FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
@jorgemf
jorgemf / compile_tensorflow_serving.sh
Last active November 27, 2018 07:25
Compile TensorFlow Serving with CUDA support (October 2017) needs bazel 5.3 , cuda 8 , cudnn 7 # UNSUPPORTED -> https://gist.github.com/jorgemf/c791841f769bff96718fd54bbdecfd4e
#!/bin/bash
TENSORFLOW_COMMIT=9e76bf324f6bac63137a02bb6e6ec9120703ea9b # August 16, 2017
TENSORFLOW_SERVING_COMMIT=267d682bf43df1c8e87332d3712c411baf162fe9 # August 18, 2017
MODELS_COMMIT=78007443138108abf5170b296b4d703b49454487 # July 25, 2017
if [ -z $TENSORFLOW_SERVING_REPO_PATH ]; then
TENSORFLOW_SERVING_REPO_PATH="serving"
fi
INITIAL_PATH=$(pwd)
@jorgemf
jorgemf / video2gif.sh
Created January 30, 2015 01:51
Shell script that converts a video to a gif file using ffmpeg and convert commands
#!/bin/sh
if [ $# -eq 0 ]; then
echo "video2gif.sh [INPUT] [HEIGHT] [START] [LENGTH]"
exit
fi
INPUT=$1
HEIGHT=$2
INIT=$3
@jorgemf
jorgemf / svg2android.sh
Last active August 29, 2015 14:14
Shell script that transforms a svg file in png resource files for an android project. It uses inkscape as a tool to export to png
#!/bin/sh
if [ $# -eq 0 ]; then
echo "svg2android.sh [INPUT] [PROJECT_DIR] [OUTPUT_NAME] [SIZE_DP]"
exit
fi
INPUT=$1
PROJECT=$2
NAME="ic_launcher"
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software