User:Est040

From imdb
Jump to: navigation, search

Hei.

Eirik dokumenterer første bruker av pyvenv

module load python # får python 3.5

cd ~
mkdir kategorier
cd kategorier

pyvenv nyhetskategorier
source nyhetskategorier/bin/activate.csh 
# NB prosjekt/bin/activate uten .sch funket ikke, formodelig fordi jeg får tildelt -tcsh og ikke -bash av neldon. (echo $0) - vet ikke hvorfor jeg får -tcsh.

pip install numpy

pip list
#numpy (1.10.0)
#pip (7.1.2)
#setuptools (18.2)

pip install sklearn

sklearn trenger scipy, og

>>> from sklearn import metrics

krasjer. Skulle ønske pip tok med dependencies...

 pip install scipy

..funker ikke.

pip install scipy
Collecting scipy
  Downloading scipy-0.16.0.tar.gz (18.1MB)
    100% |████████████████████████████████| 18.1MB 32kB/s 
Installing collected packages: scipy
  Running setup.py install for scipy
    Complete output from command /home/est040/kategorier/nyhetskategorier/bin/python3.5 -c "import setuptools, tokenize;__file__='/tmp/pip-build-ptqy9f_1/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-22ol6nmp-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/est040/kategorier/nyhetskategorier/include/site/python3.5/scipy:
    lapack_opt_info:
    openblas_lapack_info:
      libraries openblas not found in ['/home/est040/kategorier/nyhetskategorier/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
    
    lapack_mkl_info:
    mkl_info:
      libraries mkl,vml,guide not found in ['/home/est040/kategorier/nyhetskategorier/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
    
      ....more errors...
    
    ----------------------------------------
Command "/home/est040/kategorier/nyhetskategorier/bin/python3.5 -c "import setuptools, tokenize;__file__='/tmp/pip-build-ptqy9f_1/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-22ol6nmp-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/est040/kategorier/nyhetskategorier/include/site/python3.5/scipy" failed with error code 1 in /tmp/pip-build-ptqy9f_1/scipy
[nyhetskategorier] [est040@nelson ~/kategorier]$

Bjarte mener jeg bør forsøke å instyallere openblas http://www.openblas.net/ i modulsystemet..

Prøver det. Feiler med å lage folder, drista meg til å SUDO lage folder

[est040@nelson private]$ sudo mkdir -p $USER

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for est040: 
[est040@nelson private]$ ls
bjarte  est040  truls

[est040@nelson private]$ sudo chown est040:ansatt est040

ok, tror det nå skal funke. Følger videre guiden til bjarte.

# https://github.com/xianyi/OpenBLAS/wiki/Installation-Guide
wget, tar, cd
make FC=gfortran
make PREFIX=/data_bck/sw/openblas/0.2.14-gnu install

# Lage modulefile
data_bck/sw/modulefiles/openblas/0.2.14

noe feiler..

Jeg må fortelle pip hvor openblas ligger

module load python
module load openblas
pyvenv test
source test/bin/activate
mkdir test/build
pip install -d test/build numpy
pip install -d test/build scipy
cd test/build
tar xf numpy*.tar
cd numpy*
touch site.cfg
cat <<EOF
[DEFAULT]
library_dirs = /data_bck/sw/openblas/0.2.14-gnu/lib
include_dirs = /data_bck/sw/openblas/0.2.14-gnu/include

[atlas]
atlas_libs = openblas
libraries = openblas

[openblas]
libraries = openblas
library_dirs =  /data_bck/sw/openblas/0.2.14-gnu/lib
include_dirs = /data_bck/sw/openblas/0.2.14-gnu/include
EOF > site.cfg
python setup.py install
cd ..
tar xf scipy*.tar
cd scipy*
cp ../numpy*/site.cfg .
python setup.py install

Så krangla jeg en del med pip uten å bli klok, men endelig:

>>> import numpy
>>> import scipy
>>> import sklearn


Dump av mine notater fra første dag vi fikk serveren:

  1. Stuff we want
  • mosh https://mosh.mit.edu/ (needs a port opened )
  • git (gogs)
  • mysql/postgress
  • emacs (Truls sudo yum installs emacs..)

Installed software

  • python3 (we compile and make a module of for the modules system)
  • mongoDB (added to module system)

Notater, instalere python på IMDB.

Bjarte lasta ned Python-3.5.0.tgz til /scratch installerte til /data_bck/sw/python

Modulefile for python 3 laget, bruk

module load python

(dette adder python3 til path)