In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
This file contains 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 | |
# install CUDA Toolkit v8.0 | |
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network)) | |
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb" | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} | |
sudo dpkg -i ${CUDA_REPO_PKG} | |
sudo apt-get update | |
sudo apt-get -y install cuda |
This file contains 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
# configure aws credentials while on corporate network | |
function aws_config_work(){ | |
# assumes $WORK_AWS_ACCESS_KEY, $WORK_AWS_SECRET_ACCESS_KEY, $WORK_AWS_DEFAULT_REGION, $CA_PATH | |
# are user or system evironment variables | |
# environment variables are UPPERCASE even in git bash | |
export AWS_ACCESS_KEY_ID=$WORK_AWS_ACCESS_KEY | |
export AWS_SECRET_ACCESS_KEY=$WORK_AWS_SECRET_ACCESS_KEY | |
export AWS_DEFAULT_REGION=$WORK_AWS_DEFAULT_REGION | |
export AWS_CA_BUNDLE=$CA_PATH |
This file contains 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
# configure proxy for git while on corporate network | |
# From https://gist.github.com/garystafford/8196920 | |
function proxy_on(){ | |
# assumes $USERDOMAIN, $USERDNSDOMAIN, $CA_PATH | |
# are existing Windows system-level environment variables | |
# assumes $PROXY_SERVER, $PROXY_PORT | |
# are existing Windows current user-level environment variables (your user) | |
# environment variables are UPPERCASE even in git bash |
This file contains 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
yum groupinstall "Development Tools" | |
yum install kernel-devel kernel-headers dkms | |
yum install pciutils | |
lspci -nn | grep VGA # to check your NVIDIA product version | |
yum update | |
sudo sh NVIDIA-Linux-x86_64-340.32.run --kernel-source-path /usr/src/kernels/3.10.0-123.6.3.el7.x86_64 | |
This file contains 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 | |
# install CUDA Toolkit v9.0 | |
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb) | |
CUDA_REPO_PKG="cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb" | |
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/${CUDA_REPO_PKG} | |
sudo dpkg -i ${CUDA_REPO_PKG} | |
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
sudo apt-get update | |
sudo apt-get -y install cuda-9-0 |
First, install the following libraries:
$ brew install unixodbc
$ brew install freetds --with-unixodbc
FreeTDS should already work now, without configuration:
$ tsql -S [IP or hostname] -U [username] -P [password]
locale is "en_US.UTF-8"
locale charset is "UTF-8"
This file contains 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
version: "3" | |
networks: | |
kong-net: | |
driver: bridge | |
services: | |
####################################### | |
# Postgres: The database used by Kong |
This file contains 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
sentences = [] | |
labels = [] | |
with open("/text.csv", 'r') as csvfile: | |
csvfile.readline() | |
for line in csvfile.readlines(): | |
row = line.split(',') | |
labels.append(row[0]) | |
sentence = row[1].split() | |
sentences.append(' '.join([w for w in sentence if not w in stop_words])) |