ホーム » techs

techs」カテゴリーアーカイブ

ローカルPCのマウントの仕方

1.ローカルPCのIPアドレスの固定

アドレス:自分の固定IPアドレス

ネットマスク:255.255.255.0

ゲートウェイ:誰かに聞くか参照

DNSサーバー:誰かに聞くか参照

 

2.ホストネーム

sudo vi /etc/hostname

ホストネームを書き換え(いわゆるPCの名前を,割り当てられたPC名に)

 

3.ホストネーム変更の反映

sudo hostname 割り当てられたPC名

 

4.hostsに書き込み

sudo vi /etc/hosts

hostsを更新

 

5.サーバー立て&HDDマウント

インストール

sudo apt-get -y install nfs-kernel-server

 

sudo vi /etc/exports

/home 誰かに聞くか参照/24(rw,no_root_squash)

/etc/init.d/nfs-kernel-server restart
6.マウントしたHDD(ローカルPC)に移動
cd /net/自分のpc名
7.リンク作成
ln -s /net/自分のPC名/home/自分のアカウント名/ファイル名 ./

uid, gidの変更

Linuxでuid, gidを変更する方法

以下の説明では,hogeというユーザのuidとgidを4321に変更したい場合について説明する.

少し面倒ですが,以下のコマンドを実行するとuid, gidが4321に変更できる.

1. 変更したいユーザhogeとは異なるアカウントでログインする

2. ダミーのグループを作成

sudo groupadd -g 11111 tmpgroup

3. グループをダミーのグループに変更

sudo usermod -g tmpgroup hoge

4. 元のグループを削除

sudo groupdel hoge

5. gid=4321で新しいグループを作成

sudo groupadd -g 4321 hoge

6. hogeのグループを作成したグループに変更

sudo usermod -g 4321 hoge

7. hogeのuidを4321に変更

sudo usermod -u 4321 hoge

8. ダミーグループの削除

sudo groupdel tmpgroup

9. 変更後のuid, gidの確認

id hoge

How to write paper

Most important

1.Cite your previous paper if you have and it bases on your previous paper

2.It is better to change title if your paper bases on your previous paper and those titles  are same.

 

Important

1.Download template of paper from conference or journal web site

2.Do not change format.

ex. equation, citation or etc …

How to Install docker

Installation docker of Ubuntu(14.04) in first time

In this time,I tried to install docker in my PC.

So I just record how to install docker.

This may be useful to do.

(Of course,please refer this with official pages )

 

Reference URL:

Official Top Page: https://www.docker.com/

Installation of Ubuntu: https://docs.docker.com/engine/installation/linux/ubuntulinux/

Installation of Ubuntu japanese ver(Unofficial) :http://docs.docker.jp/engine/installation/linux/ubuntulinux.html

 

Preparation:

-With your terminal

1.Check your kernel ver – docker needs ver 3.10 at least.

uname -r

-From here,you may need “sudo” or root privileges

2.Update package info, check APT works with the https and get CA certificates

sudo apt-get update

sudo apt-get install apt-transport-https ca-certificates

3.Add the new GPG key.

sudo apt-key adv –keyserver hkp://p80.pool.sks-keyservers.net:80recvkeys 58118E89F3A912897C070ADBF76221572C52609D

4.Open or create docker.list in directory /etc/apt/sources.list.d .

eg)vi /etc/apt/sources.list.d/docker.list

If you cannot write or create docker.list, you needs to add sudo

eg)sudo vi  /etc/apt/sources.list.d/docker.list

5.After add an entry for corresponding your Ubuntu operating system to docker.list,save and close it.

eg)deb https://apt.dockerproject.org/repo ubuntu-trusty main

6.Update package info again.

sudo apt-get update

7.Verify that apt is pulling from the right repository.

apt-cache policy docker-engine

    (may show docker-engine info)

8.Install linux-image-extra kernel package

sudo apt-get install linux-image-extra-$(uname -r)

 

Installation

1.Update package info

sudo apt-get update

2.Install docker

sudo apt-get install docker-engine

3.Start docker demon

sudo service docker start

4.Carry sample(hello-world) out

sudo docker run hello-world

If your installation is correct,application show like “Hello from docker! “and some tutorial.

 

*attention

I don’t guarantee to work with your PC.This is just example.

You own your responsibility to install docker.

GPU(chainer)の使い方

%%%how to install anaconda,chainer, cuda and cuDNN at first time
%ubuntu 14.04

#installing anaconda
wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86_64.sh
chmod +x Anaconda-2.3.0-Linux-x86_64.sh
./Anaconda-2.3.0-Linux-x86_64.sh

#installing chainer
pip install chainer

%installing cuda
sudo wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb
sudo apt-get update

sudo apt-get install cuda

vi .bashrc
%export PATH=/usr/local/cuda-7.5/bin:$PATH
%export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH
sudo reboot

%installing anaconda theano
sudo apt-get install g++ libopenblas-dev git

%cuDNN
tar zxvf cudnn-7.0-linux-x64-v4.0-prod.tgz
cd cuda
sudo cp include/cudnn.h /usr/local/cuda/include
sudo cp lib64/libcudnn.so.4.0.7 /usr/local/cuda/lib64/
sudo cp lib64/libcudnn_static.a /usr/local/cuda/lib64/
cd /usr/local/cuda/lib64/
sudo ln -s libcudnn.so.4.0.7
sudo ln -s libcudnn.so.4.0.7 libcudnn.so.4
sudo ln -s libcudnn.so.4 libcudnn.so

% we have to reinstall chainer after installing cuDNN
pip uninstall chainer
pip install chainer

%%%how to install chainer on the pc installed cuda and cuDNN

#installing anaconda
wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86_64.sh
chmod +x Anaconda-2.3.0-Linux-x86_64.sh
./Anaconda-2.3.0-Linux-x86_64.sh

# connecting the path of cuda
vi .bashrc
%export PATH=/usr/local/cuda-7.5/bin:$PATH
%export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH

#restart terminal

#installing chainer
pip install chainer

THEANO_FLAGS=floatX=float32,device=gpu