ml-finance-python

python scripts for finance machine learning

git clone https://9o.is/git/ml-finance-python.git

aws_gpu.sh

(2077B)


      1 #!/usr/bin/env bash
      2 
      3 
      4 sudo apt-get install software-properties-common;
      5 sudo apt-add-repository universe;
      6 sudo apt-get update && sudo apt upgrade -y;
      7 
      8 sudo apt install -y zlib1g-dev build-essential libncursesw5-dev libreadline-gplv2-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev libbz2-dev libboost-all-dev cmake glances
      9 
     10 
     11 sudo apt install -y ubuntu-drivers-common;
     12 ubuntu-drivers devices;
     13 sudo ubuntu-drivers autoinstall;
     14 sudo reboot;
     15 
     16 curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
     17 pyenv install 3.6.6
     18 pyenv global 3.6.6
     19 
     20 pip install pandas scikit-learn scipy tables pip -U;
     21 
     22 wget -O cuda_9.1.85_387.26_linux.run -c https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux
     23 sudo sh cuda_9.1.85_387.26_linux.run --override
     24 # don't accept driver install
     25 
     26 # patches
     27 wget -O cuda_9.1.85.1_linux.run -c https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/1/cuda_9.1.85.1_linux
     28 sudo sh cuda_9.1.85.1_linux.run
     29 wget -O cuda_9.1.85.2_linux.run -c https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/2/cuda_9.1.85.2_linux
     30 sudo sh cuda_9.1.85.2_linux.run
     31 wget -O cuda_9.1.85.3_linux.run -c https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/3/cuda_9.1.85.3_linux
     32 sudo sh cuda_9.1.85.3_linux.run
     33 
     34 # test:
     35 nvidia-smi
     36 nvcc --version
     37 
     38 #nvcc: NVIDIA (R) Cuda compiler driver
     39 #Copyright (c) 2005-2017 NVIDIA Corporation
     40 #Built on Fri_Nov__3_21:07:56_CDT_2017
     41 
     42 sudo echo "/usr/local/cuda-9.1/lib64" |sudo tee -a /etc/ld.so.conf
     43 
     44 git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM;
     45 mkdir build ; cd build;
     46 cmake -DUSE_GPU=1 .. -DOpenCL_LIBRARY=/usr/local/cuda-9.1/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda-9.1/include/ ..
     47 make -j8
     48 
     49 python setup.py install --gpu --opencl-include-dir=/usr/local/cuda-9.1/include/ --opencl-library=/usr/local/cuda-9.1/lib64/libOpenCL.so
     50 
     51 wget -O cuda_10.0.130_410.48_linux.run -c https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux
     52 sudo sh cuda_10.0.130_410.48_linux.run
     53