「はじめての深層学習(ディープラーニング)プログラミング」本とjetson nano

#$ cat /etc/lsb-release
#DISTRIB_ID=Ubuntu
#DISTRIB_RELEASE=18.04
#DISTRIB_CODENAME=bionic
#DISTRIB_DESCRIPTION=”Ubuntu 18.04.3 LTS”

# pip3コマンドはpython3 -m pipと入力しても実行できます。

cd ~/
git clone https://github.com/uei/deel.git
pip3 install chainer=”1.24.0″
pip3 install cython
pip3 install pkgconfig

cd $DEELROOT
sudo python3 setup.py install

# — get data sets —

"""#### tiny.py ###
from deel import *
from deel.network import *
from deel.commands import *

deel = Deel()

CNN = AlexNet()


CNN.Input("deel.png")
CNN.classify()
ShowLabels()
"""

cd $DEELROOT
$ python3 tiny.py “「はじめての深層学習(ディープラーニング)プログラミング」本とjetson nano” の続きを読む

jetson nanoでxpraでウィンドウとそのサウンドを転送

ノーマルユーザーで実行するとsystemdのパーミッションエラーやXの権限昇格なんとかが出て、動かない。

なんとか動かす。

  1. /etc/X11/xorg.confを別名でバックアップ。
  2. /etc/xpra/xorg.confを/etc/X11にコピー。
  3. /etc/xpra/conf.d/55_server_x11.confのxvfb =を次のように書き換える。
    xvfb = Xorg -noreset -novtswitch -nolisten tcp +extension GLX +extension RANDR +extension RENDER -auth $XAUTHORITY -configdir ./ -config xpra.conf
  4. /etc/xpra/conf.d/60_server.confのsystemd-run =を次のように書き換える。systemd-run = no

あとはjetsonでcd /etc/X11して、xpra start :100して、転送を受けたい側(クライアント側)でxpra attach ssh:<login id>@<host ip>:100して、jetsonでDISPLAY=:100 chromium-browserすると、クライアント側で画面が投影される。

エンコーディングのオススメはPNG (8bpp colour)。

  • クライアント側の~/.xpra/xpra.confにencoding = png/P

 

参考

106jpキーボードのレイアウトは、クライアント側の~/.xpra/xpra.confでkeyboard-layout = jpとします。

クライアント側のGPUを使うにはクライアント側の~/.xpra/xpra.confでopengl = yesとします。
Xpra Bug tracker and wiki > Getting Started : Configuration

Xorgのキーボードの設定が通らないとき

一時的に:
$ setxkbmap -model jp106 -layout jp

※参考:Xのキーボード設定 – Akionux-wiki

または、IMがXのキーボードの設定をオーバーライドしてるときがあるので、IMにそういった仕様がないか、または設定ファイルに記述がないかを確認。
ex. Fcitx: ~/.config/fcitx/conf/fcitx-xkb.config

[X Keyboard]
# Allow to Override System XKB Settings
# Available Value:
# True False
OverrideSystemXKBSettings=False # default : True

FreeBSD Release12をMacBook Pro (Mid 2014, 13 inch)にインストール

インストール

  • ブートローダーはEfi Bootを選ぶ。
  • インストーラーのOPTIONでSafe ModeをONにする。

キーボード(日本語配列)

  • インストールのときに日本語レイアウトに設定してそのまま使える。
  • メディアキー・バックライトはまだ使ってない。

タッチパッド

X-Window

  • ディスプレイドライバーはデフォルトならscfbが映る。
  • drm-kmodパッケージを入れて/etc/rc.confに「kld_list="/boot/modules/i915kms.ko"」としてると、intelドライバーが使える。 →参考:Graphics - FreeBSD Wiki
  • Retinaのフル解像度で文字と絵が小さいときは、xrandrでスケーリング。
  • キーボードは日本語レイアウトで特に問題ない。
  • マウスはmutouchにするとタッチパッドで右クリックやスクロールが使える。

ビデオのその他

    • i915kmsを入れるとHDMI外部出力を認識する?
      HDMI-2 connected (normal left inverted right x axis y axis)

  • 出力デバイスの切り替え
    • 内蔵スピーカー:sysctl hw.snd.default_unit=1(音が出ない)
    • イヤホン:sysctl hw.snd.default_unit=2

ネットワーク

電源とBattery

仮想化

  • macosを一度ブートしてからFreeBSDをリブートするか、rEFIndの”enable_and_lock_vmx=TRUE”、”spoof_osx_version=10.9″の設定でインストール。
    • bhyveで物理ディスクにインストールしたWindows 8.1が動くのを確認。

Thunderbolt2

  • ブート前からケーブルを繋いでいてドライバーがあれば動く。 →参考:FreeBSD on Mac
    • AKiTiO Thunder2 PCIe BoxとNVIDIA GTX 960を繋いでeGPUを認識するのを確認。
      • $ sudo pciconf -lvbce
        vgapci1@pci0:10:0:0: class=0x030000 card=0x237519da chip=0x140110de rev=0xa1 hdr=0x00
        vendor = 'NVIDIA Corporation'
        device = 'GM206 [GeForce GTX 960]'
        class = display
        subclass = VGA

ria | web server timeout (タイムアウト)

– apache 2.4
  - apache2handler default
    - TimeOut = 300 # 秒
      - https://httpd.apache.org/docs/2.4/mod/core.html#timeout

– php latest
  - mod_php default
    - max_execution_time = 30 # 秒
      - http://php.net/manual/ja/info.configuration.php#ini.max-execution-time
  - # RELATION
    - memory_limit = 128M # PHP 5.2.0 より前は “8M”、PHP 5.2.0 では “16M”
      - http://php.net/manual/ja/ini.core.php#ini.memory-limit

– Adobe Air
  - air 1.5 runtime default
    - RemoteObject 60秒 (macOS)
      - requestTimeoutをリセットできない(?)
        - https://forums.adobe.com/thread/696177?tstart=0
    - URLRequest ???
    - NetConnection. httpIdleTimeout = ??? # milli second
  - air 1.5.3 runtime default
    - RemoteObject 30秒オーバー(?)
      - requestTimeoutをリセットできる
        - https://forums.adobe.com/message/3041722#3041722
  - air 2.x runtime default
    - RemoteObject 60秒 (macOS)
      - requestTimeoutをリセットできない(?)
        - https://forums.adobe.com/thread/696177?tstart=0
    - URLRequest ??? milli second
      - idleTimeoutをリセットできない(?)
        - https://help.adobe.com/ja_JP/FlashPlatform/reference/actionscript/3/flash/net/URLRequest.html#idleTimeout
        - https://peterkeating.co.uk/long-running-web-service-requests-in-adobe-air/

[Blender] Bulletライブラリを外すmakeルールの内容

blender_full.cmake

# Turn everything ON thats expected for an official release builds.
#
# Example usage:
# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender
#

set(WITH_ALEMBIC ON CACHE BOOL “” FORCE)
set(WITH_BUILDINFO ON CACHE BOOL “” FORCE)
set(WITH_BULLET OFF CACHE BOOL “” FORCE)

#OFFで保存したら、make fullでビルドする。

“[Blender] Bulletライブラリを外すmakeルールの内容” の続きを読む