本家様 https://docs.smartscope.org/
SmartScope is a framework for automated cryo-electron microscopy (Cryo-EM). The main purpose is to automate specimen screening, document the process,
and provide a portal for visualization and interaction with the microscope. The software bundles a database, the main imaging workflow and a web user-inteface for easy access.
To run Smartscope, simply fill the form about which grids to be screened, press start and wait for live results to come in.DeepL様翻訳
SmartScopeは自動クライオ電子顕微鏡(Cryo-EM)用のフレームワークです。主な目的は、試料スクリーニングを自動化し、そのプロセスを文書化することです、
可視化と顕微鏡とのインタラクションのためのポータルを提供することである。このソフトウェアには、データベース、主なイメージングワークフロー、そして簡単にアクセスできるウェブユーザーインターフェイスがバンドルされています。
Smartscopeを実行するには、どのグリッドをスクリーニングするかフォームに記入し、スタートを押し、ライブ結果が来るのを待つだけです。一瞬 Appion/Leginon ?って思ってしまった
Requirements
dockerで動かすのが楽みたい.
っで作ってみる
dockerを準備します. rootlessではなくrootで動かすdockerにしてます.
そして
[root@rockylinux9 ~]# docker --version
Docker version 29.1.5, build 0e6fee6
[root@rockylinux9 ~]# mkdir /apps/SmartScope/src -p
[root@rockylinux9 ~]# cd /apps/SmartScope/src
[root@rockylinux9 src]# wget docs.smartscope.org/downloads/SmartScopeInstallation.tar.gz --no-check-certificate
[root@rockylinux9 src]# cd ..
[root@rockylinux9 SmartScope]# tar xf src/SmartScopeInstallation.tar.gz
[root@rockylinux9 SmartScope]# chown -R root:root ./*
[root@rockylinux9 SmartScope]# ls -l
total 20
-rw-rw-r--. 1 root root 191 Sep 1 2023 database.conf
-rw-rw-r--. 1 root root 1900 Sep 1 2023 docker-compose.yml
drwxrwxr-x. 2 root root 27 Aug 29 2023 shared
-rw-rw-r--. 1 root root 852 Aug 29 2023 smartscope.conf
-rw-rw-r--. 1 root root 1480 Sep 1 2023 smartscope.sh
-rw-rw-r--. 1 root root 593 Aug 29 2023 smartscope.yml
drwxr-xr-x. 2 root root 43 Jan 26 11:29 src
[root@rockylinux9 SmartScope]# chmod +x smartscope.sh
[root@rockylinux9 SmartScope]# ./smartscope.sh
Usage: smartscope.sh subcommand [command]
Subcommand DESCRIPTION
========== ===========
start Start SmartScope
stop Stop smartscope
run command Run a smartscope command in the smartscope container
exec command Run any shell command in the smartscope container
python Runs an interactive ipython shell inside the smartscope container
[root@rockylinux9 SmartScope]#あとは「./smartscope.sh start」でいいのですが、
電顕に合わせて「smartscope.yml」を修正する.
version: "3"
services:
smartscope:
# image: ghcr.io/niehs/smartscope:0.8-rc.2 #Change version here
user: ${UID}:${GID} #This corresponds to the user running the smarscope.sh script
volumes:
######## ADD YOUR MAIN DATA LOCATION ##########
- ./data:/mnt/data
# Example:
# - /nfs/data/:/mnt/data/
######## ADD YOUR MICROSCOPES #########
# The synthax from the microscope volumes is as follows:
# - /path/to/where/serialem/will/write/files/:/mnt/your_scope_name_here/
# Example:
# - /mnt/gatan_Raid_X/smartscope/:/mnt/arctica/dockerでの「volume」定義は「実フォルダ」:「docker内でのフォルダ」になる。
ここではドキュメントに書かれているように
「ADD YOUR MAIN DATA LOCATION」となるdocker内フォルダ「/mnt/data」には実フォルダ「/mnt/nas/smartscope/」を当てて
「ADD YOUR MICROSCOPES」のdocker内フォルダ「/mnt/myscope1/」に、実フォルダ「/mnt/serialemComputer/smartscope/」をあてる
version: "3"
services:
smartscope:
# image: ghcr.io/niehs/smartscope:0.8-rc.2 #Change version here
user: ${UID}:${GID} #This corresponds to the user running the smarscope.sh script
volumes:
######## ADD YOUR MAIN DATA LOCATION ##########
- /mnt/nas/smartscope/:/mnt/data/
# Example:
# - /nfs/data/:/mnt/data/
######## ADD YOUR MICROSCOPES #########
# The synthax from the microscope volumes is as follows:
# - /path/to/where/serialem/will/write/files/:/mnt/your_scope_name_here/
- /mnt/serialemComputer/smartscope/:/mnt/myscope1/
# Example:
# - /mnt/gatan_Raid_X/smartscope/:/mnt/arctica/っで実フォルダを用意しておきます
[root@rockylinux9 SmartScope]# mkdir /mnt/nas/smartscope/ -p
[root@rockylinux9 SmartScope]# mkdir /mnt/serialemComputer/smartscope/ -pっで起動させてみる
[root@rockylinux9 SmartScope]# ./smartscope.sh start
:
:
[root@rockylinux9 SmartScope]#
[root@rockylinux9 SmartScope]# lsof -i -P
:
docker-pr 4892 root 7u IPv4 44806 0t0 TCP *:48000 (LISTEN)
docker-pr 4898 root 7u IPv6 44807 0t0 TCP *:48000 (LISTEN)
[root@rockylinux9 SmartScope]#っで接続
そのままでは実行したノードでないとログインできないので、調整します
[root@rockylinux9 SmartScope]# vi smartscope.conf
ALLOWED_HOSTS=localhost
↓
ALLOWED_HOSTS=*
[root@rockylinux9 SmartScope]#その上で
[root@rockylinux9 SmartScope]# ./smartscope.sh stop
[root@rockylinux9 SmartScope]# ./smartscope.sh startで実行ノード以外からもアクセス可能になります.

初期アカウントは adminでパスワードは smartscope なそうな. っでそれで入ってみます.
そうするとこんな感じ. 電顕とかカメラの詳細を登録して、あとSerialEMとpythonで接続するそうな. これ以上は現場でやってみないと分からないかなぁ.

既定でIPv6も存在することが前提みたい。もしIPv6のアドレスが存在していないと起動しないご様子.
その場合ですが、nginxのコンテナをIPv6無効で作り直す
[root@rockylinux9 SmartScope]# ./smartscope.sh start
[root@rockylinux9 SmartScope]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b6a90b7648ed nginx "/docker-entrypoint.…" 12 seconds ago Restarting (1) 3 seconds ago smartscope-nginx-1
9ae9d90650c5 ghcr.io/niehs/smartscope:0.9.1 "/opt/smartscope/Doc…" 12 seconds ago Up 11 seconds smartscope
9e537fb1bd80 redis:6.2-alpine "docker-entrypoint.s…" 12 seconds ago Up 11 seconds 6379/tcp smartscope-cache-1
227826eb5e3d mariadb:10.5 "docker-entrypoint.s…" 12 seconds ago Up 11 seconds 3306/tcp smartscope-db
[root@rockylinux9 SmartScope]#
[root@rockylinux9 SmartScope]# vi shared/nginx/default.conf
:
server {
listen 80;
# listen [::]:80; <--- 先頭に[#]を入れて無効化します
server_name _;
:
[root@rockylinux9 SmartScope]#
[root@rockylinux9 SmartScope]# docker rm -f smartscope-nginx-1
[root@rockylinux9 SmartScope]# ./smartscope.sh start
[root@rockylinux9 SmartScope]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
275a668b1ad2 nginx "/docker-entrypoint.…" 6 minutes ago Up 6 minutes 0.0.0.0:48000->80/tcp smartscope-nginx-1
9bff20171252 ghcr.io/niehs/smartscope:0.9.1 "/opt/smartscope/Doc…" 7 minutes ago Up 7 minutes smartscope
ac405a11ec55 redis:6.2-alpine "docker-entrypoint.s…" 7 minutes ago Up 7 minutes 6379/tcp smartscope-cache-1
2f7d9eab9a5f mariadb:10.5 "docker-entrypoint.s…" 7 minutes ago Up 7 minutes 3306/tcp smartscope-db
[root@rockylinux9 SmartScope]#
[root@rockylinux9 SmartScope]# lsof -i -P
:
docker-pr 22302 root 7u IPv4 140958 0t0 TCP *:48000 (LISTEN)
:
[root@rockylinux9 SmartScope]#ただ根本解決ではないです。smartscope.shを再起動すると元に戻ってしまいます。