openSUSE - 과학계산을 위한 Python, Jupyter Notebook

이 글은 OpenSuse LEAP 15 에서 과학계산을 위한 파이썬 환경을 위한 Jupyter Notebook을 설치하는 과정을 요약하고 있다.

이 글에서는 시스템 패키지로 Python3, jupyter-notebook 을 설치하고, 파이썬 가상환경에서 과학계산 파이썬 모듈을 설치한 후에 Jupyter notebook 을 운영하도록 한다.

과학계산을 위한 Python Jupyter 환경

아래 같은 플랫폼에서 시스템 패키지 소프트웨어와 파이썬 모듈을 설치하는 과정이다.

  • Raspberry Pi 3
  • openSUSE LEAP 42.3, 15.0, 15.1
  • Jupyter Notebook
  • Python 그래프 matplotlib 및 pillow 이미지 라이브러리
  • 과학계산 모듈: numpy, scipy 등
  • 파이썬 가상환경
    • pandas
자세히 보기

Raspberry Pi: mmcblk

mmcblk

SD/MMC card 는 MMC 서브시스템을 /dev/mmcblk{id} 형식으로 블럭 장치로 사용한다.

dmesg 로 부트 메시지를 보면 SDHCI 인터페이스에 장착한 장치를 확인할 수 있다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[    0.789621] sdhci: Secure Digital Host Controller Interface driver
[ 0.789628] sdhci: Copyright(c) Pierre Ossman
[ 0.789999] sdhost-bcm2835 3f202000.sdhost: could not get clk, deferring probe
[ 0.790252] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.791051] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.791232] hidraw: raw HID events driver (C) Jiri Kosina
[ 0.791461] usbcore: registered new interface driver usbhid
[ 0.791467] usbhid: USB HID core driver
[ 0.792448] vchiq: vchiq_init_state: slot_zero = 0xb6980000, is_master = 0
[ 0.794533] Initializing XFRM netlink socket
[ 0.794566] NET: Registered protocol family 17
[ 0.794724] Key type dns_resolver registered
[ 0.795223] Registering SWP/SWPB emulation handler
[ 0.796192] registered taskstats version 1
[ 0.796681] vc-sm: Videocore shared memory driver
[ 0.796694] [vc_sm_connected_init]: start
[ 0.802967] [vc_sm_connected_init]: end - returning 0
[ 0.809343] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[ 0.809410] console [ttyAMA0] enabled
[ 0.811406] sdhost: log_buf @ b6913000 (f6913000)
[ 0.889149] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 0.889333] of_cfs_init
[ 0.889478] of_cfs_init: OK
[ 0.890211] Waiting for root device /dev/mmcblk0p2...
[ 0.956566] mmc0: host does not support reading read-only switch, assuming write-enable
[ 0.958563] mmc0: new high speed SDHC card at address 59b4
[ 0.959555] mmcblk0: mmc0:59b4 00000 14.9 GiB
[ 0.961428] mmcblk0: p1 p2

메시지에서 보듯 mmc0 장치에 카드가 삽입되기 전에 인터럽트가 없다.

1
2
$ cat /proc/interrupts |grep mmc
86: 393 0 0 0 ARMCTRL-level 88 Edge mmc0

https://developer.toradex.com/knowledge-base/sd-mmc-card-(linux)

Raspberry Pi : Digital Signage

Digital Signage

라즈베리파이에서 슬라이드쇼 구현해 보자.

py-slideshow

https://github.com/cgoldberg/py-slideshow/

pyglet 으로 이미지를 패닝, 확대 효과를 가진 슬라이드 쇼.

Screenly OSE

Screenly Open Source Edition은 디지털 시그네이지 소프트웨어 이다.

Disk images

The recommended installation method is to grab the latest disk image from here

라즈비안에서 설치

Raspbian Lite 에서 설치를 할 수 있다.

먼저

sudo apt install -y network-manager

1
2
3
4
5
6
7
8
9
10
11
$ bash <(curl -sL https://www.screenly.io/install-ose.sh)
_____ __ ____ _____ ______
/ ___/_____________ ___ ____ / /_ __ / __ \/ ___// ____/
\__ \/ ___/ ___/ _ \/ _ \/ __ \/ / / / / / / / /\__ \/ __/
___/ / /__/ / / __/ __/ / / / / /_/ / / /_/ /___/ / /___
/____/\___/_/ \___/\___/_/ /_/_/\__, / \____//____/_____/
/____/
Screenly OSE requires a dedicated Raspberry Pi / SD card.
You will not be able to use the regular desktop environment once installed.

Do you still want to continue? (y/N)
1
Would you like to use the experimental branch? It contains the last major changes, such as the new browser and migrating to Docker (y/N)

It looks like NetworkManager is not installed. Please install it by running ‘sudo apt install -y network-manager’ and then re-run the installation.

1
Would you like to perform a full system upgrade as well? (y/N)

설치를 시작하면 15분 이상이 소요된다.
This installation will take 15 minutes to several hours, depending on variables such as:

1
2
Installation completed.
You need to reboot the system for the installation to complete. Would you like to reboot now? (y/N)

pipresent

python2 기반이고, 실행이 안됐다.

https://pipresents.wordpress.com

https://github.com/KenT2/pipresents-beep

Requirements
  • must use the latest version of Raspbian Stretch with Desktop (not the Lite version)
  • must be run from the PIXEL desktop.
  • must be installed and run from user Pi

install

required packages

1
2
sudo apt install python-imaging python-pil.imagetk python-pexpect
sudo apt install unclutter mplayer uzbl

optional packages

sudo pip install evdev (if you are using the input device I/O plugin)
sudo apt-get install mpg123 (for .mp3 beeps)

1
wget https://github.com/KenT2/pipresents-beep/tarball/master -O - | tar xz

Dead-simple Digital menu

https://github.com/angryrancor/ezdmb

Python 과학계산을 위한 Jupyter Notebook - macOS

과학계산을 위한 Jupyter 설치 및 구성까지 요약하고 있다.

과학계산을 위한 Python Jupyter

Raspberry Pi 3 위에 설치한 openSUSE LEAP 42.3 과 15.0 에서 과학계산을 위한 Python 개발환경과 Jupyter Notebook 환경을 정리한다.

  • 개발 프론트 엔드: Jupyter
  • 과학계산 모듈: numpy, scipy 등

Python과 Virtualenv 환경을 더 알고 싶으면 다음 두 링크에 자세한 설명이 있다.

자세히 보기

Getting Started `firewalld`

RedHat, CentOS, Fedora 배포본 등에서 표준 방화벽 인터페이스로 제공되는 최신 FirewallD 사용을 시작해 보자. firewalld 패키지 설치는 각 배포본의 방법으로 설치하면 된다.

여기서는 OpenSUSE, Armbian 배포본을 설치한 시스템에서 firewalld 방화벽을 구성하고 설정하는 과정을 요약 정리했다.

자세히 보기

Raspberry Pi : Upgrade OpenSUSE LEAP 42.2 to 42.3

Raspberry Pi 3 에 설치해 사용중이던 openSUSE LEAP 42.2의 지원이 종료되어, 2019년가지 지원하는 LEAP 42.3으로 업그레이드하는 과정을 정리했다.

openSUSE는 LEAP 15.0으로 최신 버전으로 배포하고 있다. 42.2에서 15.0으로 바로 업그레이드시 내가 해결 못하는 문제가 생겨서 42.3으로 업그레이드 했다.

자세히 보기

Raspberry Pi : Raspbian 설치준비

이 글은 Raspberry Pi Programming 과정을 진행하며 강의한 자료를 바탕으로 공개강의를 위한 텍스트로 슬라이드쉐어, blog.thinkbee.kr 그리고 실제 과정을 영상 youtube 채널에 공개할 목적으로 작성한다.

Install Rasbperry Pi 글타래는 아래 같이 구성되며 간단한 소개, Serial console, OS 설치, Service 구성 및 사용에 대해 작성했다.

  1. Raspberry Pi 설치준비
  2. Install Raspbian OS
  3. Managing Service daemon
  4. Basic OS Security for Server
  5. Install & Configuration - Nginx, Node JS, Jupyter
자세히 보기

Ubuntu/Debian ARM Cross compile 환경

이 글은 우분투, 리눅스 박스에서 GNU ARM Cross compiler 를 설치하고 관리하는 방법을 다루고 있다.

2018-05-17: sidebar.nav/linux 사용
{: .right-history}

ARM Cross compiler 설치

우분투/데비안 리눅스에서 제공하는 ARM Toolchain 환경은 Linaro 툴체인을 바탕으로 만들어져 있어서 두가지 버전으로 제공된다. Hard Float을 지원하는 버전과 그렇지 않은 버전이다.[^1]

자세히 보기

SD Card 포맷 및 디스크 이미지 사용하기

SBC, PC 등의 머신에서 SD Card 사용에 필요한 사항을 정리했다.

2018-08-30: 전체 내용 편집
2017-10-30: swap 추가, timezone 수정
{:.right-history}


## SD Card 와 디스크 이미지 사용하기

SD Card는 Secure Digital의 약자로 Flash memory(비휘발성) 카드 포맷이다.

자세한 내용은 Wikipedia: SD Card 를 확인하자.

자세히 보기