Skip to content

Instantly share code, notes, and snippets.

View naviocean's full-sized avatar
🌴
On vacation

Duong Le naviocean

🌴
On vacation
View GitHub Profile
@naviocean
naviocean / pytorch_setup.sh
Last active May 28, 2019 03:23 — forked from kylemcdonald/pytorch_setup.sh
Install CUDA 9.2, cuDNN 7.2.1, Anaconda and PyTorch on Ubuntu 16.04.
# tested on AWS p2.xlarge August 29, 2018
# install CUDA
sudo apt-get update && sudo apt-get install wget -y --no-install-recommends
CUDA_URL="https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda-repo-ubuntu1604-9-2-local_9.2.148-1_amd64"
wget -c ${CUDA_URL} -O cuda.deb
sudo dpkg --install cuda.deb
sudo apt-key add /var/cuda-repo-9-2-local/7fa2af80.pub
sudo apt-get update
sudo apt-get install -y cuda
@naviocean
naviocean / install-cuda-10-bionic.sh
Created February 14, 2019 08:33 — forked from bogdan-kulynych/install-cuda-10-bionic.sh
Install CUDA 10 on Ubuntu 18.04
#!/bin/bash
# Install CUDA Toolkit 10
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo apt update
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt update
sudo apt install -y cuda
@naviocean
naviocean / ubuntu-cuda-caffe.Dockerfile
Last active October 11, 2018 08:44 — forked from jcboyd/ubuntu-cuda-caffe.Dockerfile
Dockerfile for ubuntu 16.04 + CUDA 8.0 + Caffe for deep learning
# $ nvida-docker run -it naviocean/convert
# Download base image
FROM ubuntu:16.04
# Set environment variables
ENV PATH "/usr/local/cuda-8.0/bin:$PATH"
ENV LD_LIBRARY_PATH "/usr/local/cuda-8.0/lib:$LD_LIBRARY_PATH"
# Set keyboard configuration in advance of installing CUDA
@naviocean
naviocean / classifier_from_little_data_script_3.py
Created July 27, 2018 08:37 — forked from fchollet/classifier_from_little_data_script_3.py
Fine-tuning a Keras model. Updated to the Keras 2.0 API.
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@naviocean
naviocean / openresty-ubuntu-install.sh
Last active July 14, 2017 23:51 — forked from alex-roman/openresty-ubuntu-install.sh
Easy install openresty (used and tested on Ubuntu 14.04, 15.10 and 16.04)
#!/bin/bash
apt-get -y update
apt-get -y install nginx-extras build-essential libpcre3-dev libssl-dev libgeoip-dev libpq-dev libxslt1-dev libgd2-xpm-dev
wget -c https://openresty.org/download/openresty-1.11.2.4.tar.gz
tar zxvf openresty-1.11.2.4.tar.gz
cd openresty-1.11.2.4
./configure \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \