I am Charmie

メモとログ

install 3D Slicer on Ubuntu 20.04

step 1 install pre-requisities

follow this

sudo apt install libpulse-dev libnss3 libglu1-mesa
sudo apt install --reinstall libxcb-xinerama0

step 2 download the package

download the package from here. In my case, it's Slicer-4.11.20210226-linux-amd64.tar.gz.

step 3 copy the extracted package

I put the extracted package on /opt/slicer.

sudo mkdir /opt/slicer
sudo cp -a Slicer-4.11.20210226-linux-amd64/* /opt/slicer/

then, add the following line at the end of .bashrc.

export PATH="$PATH:/opt/slicer"

step 4 add desktop entry

make slicer.desktop with the following contents.

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Slicer
Commend=Slicer for ubuntu
Exec=/opt/slicer/Slicer
Icon=/opt/slicer/bin/Slicer-SplashScreen.png

then, executed the following commands to enable the desktop entry.

cp slicer.desktop .local/share/applications/
chmod 773 .local/share/applications/

Brave browserのアンインストール

ここで書いている情報に従ったらうまくいった.

sudo apt purge brave-browser brave-keyring
sudo rm /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update

現象

apt update を実行すると,以下のエラーが発生(厳密にはワーニング).brave browserを数日前にアンインストールしたなぁと思って色々ぐぐってみた.

GPG error: https://brave-browser-apt-release.s3.brave.com stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A8580BDC82D3DC6C
W: Failed to fetch https://brave-browser-apt-release.s3.brave.com/dists/stable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A8580BDC82D3DC6C
W: Some index files failed to download. They have been ignored, or old ones used instead.

プロジェクタも使えるホワイトボード

  1. 天吊りDIY
  2. 天吊りプロジェクタリスト
  3. DLPがカラーホイールつかってるからダメ
  4. プロジェクタの比較
物品 価格 個数 総額
マグネット式ホワイトボード 13200 2 26400
プロジェクタ
ワイヤレスプロジェクタ 98000 1 98000

PyTorch and GPyTorch on Windows

改めてWindowsはクソ.

手順としては,以下のようにインストールしていく. cuDNNのインストールディレクトリを環境変数に設定しなくてもPyTorchのサンプルプログラムは動いたけど,本当に大丈夫なのかは謎.

  1. NVIDIA Driverのインストール
  2. NVIDIA Driverを最新版(472.84)にアップデート
  3. CUDAも11.4にアップデートされた
  4. CUDA Toolkitのインストール
  5. 11.4.3を選択
  6. NVIDIA Driverと共に勝手にアップデートされたCUDAのバージョンに合わせたが,11.5.0でもOKなのか分からない
  7. Visual Studioのインストール
  8. 昔インストールした2019 Community Editionをそのまま使用
  9. Visual Studio Installerを起動してTools and Windows SDKを追加インストールする必要あり
  10. 全く持って理解に苦しむんだけど,stdlib系の.hファイルがデフォルトでインストールされていないため (参照)
  11. CUDA Toolkitのサンプルプログラム実行
  12. 上記のWindows SDKのインストールをしないとエラー祭り
  13. vulkan, freeglutなどのヘッダファイルがないエラーが起きる
  14. cuDNNのインストール
  15. CUDAのバージョンに該当するcuDNN(zipファイル)をダウンロード
  16. 展開したら cuda フォルダ内の bin, include, lib フォルダを CUDA Toolkitのフォルダにコピー
    • 自分の環境は C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4 だった
  17. Anaconda (python 3.9)のインストール
  18. 現バージョンではデフォルトでpython 3.9がインストールされる
  19. Anacondaのフォルダにアクセス権限を設ける
    • C:\ProgramData\Anaconda3 というフォルダだった
    • フォルダ > プロパティ > セキュリティ > 詳細設定 > 継承を有効化
    • 読み取りと実行の権限を付与しないとAnaconda系の機能を使えない
  20. PyTorchのインストール
  21. 自身の環境に合わせてインストールコマンドを選択
  22. Anaconda Promptを管理者として起動して,インストールコマンドを実行

Rのインストール

全然うまくいかなかったので,やり方を調べた このページを参考にした

手順1: パブリックキーを手動で取得

  • このページでファイルを取得
  • キーは0xE298A3A825C0D65DFD57CBB651716619E084DAB9
  • 表示されるファイルを保存 (lookup.txtとして保存)

手順2: キーを追加

$ cat lookup.txt | sudo apt-key add -
$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'

手順3: r-baseをインストール

$ sudo apt update
$ sudo apt install r-base

手順4: Rのバージョンを確認

Rのバージョンが4.1以上になっていればOK.

$ R --version

R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

3.6などがインストールされている場合は,一度アンインストールしてからレポジトリを追加して再インストール

$ sudo apt purge --remove r-base
$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
$ sudo apt update
$ sudo apt install r-base