Skip to content

Commit 14f7369

Browse files
Copilotbeniroquai
andcommitted
Complete all TODO items in ImSwitch documentation files
Co-authored-by: beniroquai <4345528+beniroquai@users.noreply.github.com>
1 parent 8b01b3a commit 14f7369

8 files changed

Lines changed: 1553 additions & 143 deletions

File tree

docs/05_ImSwitch/Advanced/01_Installation/Docker.md

Lines changed: 58 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,58 @@
22

33
Docker installation is the recommended method for most users as it provides a complete, pre-configured environment with all dependencies included.
44

5-
6-
TODO: Merge with all docker-related ttutorials
7-
85
## Overview
96

10-
ImSwitch runs as a Python application inside a Docker container with:
11-
- Ubuntu base image with all required libraries
12-
- UC2-REST library for ESP32 control
13-
- FastAPI REST API server for remote control
14-
- React web interface for browser-based control
15-
- Napari integration for image processing
16-
- All necessary camera drivers inside the docker image
7+
ImSwitch is deployed as a Python application inside a Docker container with:
8+
- **Ubuntu base image** with all required libraries and dependencies
9+
- **UC2-REST library** for ESP32 control and hardware communication
10+
- **FastAPI REST API server** for remote control and automation
11+
- **React web interface** for browser-based microscopy control
12+
- **Napari integration** for advanced image processing and analysis
13+
- **Pre-installed camera drivers** for supported hardware (HIK, Daheng, USB cameras)
14+
15+
### Architecture Diagram
1716

1817
![ImSwitch Docker Architecture](../IMAGES/ImSwitchDocker.png)
1918

19+
The system architecture includes:
20+
- **Central component**: Python-based microscopy software *ImSwitch*
21+
- **Function**: Connects hardware elements, device drivers, and controllers
22+
- **Application**: Enables time-lapse recordings and complex scanning patterns
23+
- **Abstraction**: Software acts as an independent server with generic interfaces
24+
- **Docker integration**: ImSwitch packaged as a container with cloud-based compilation
25+
- **Easy updates**: Automated script downloads and integrates changes
26+
- **Hardware workflow**: Hardware integrated via JSON configuration files
27+
- **USB integration**: Direct device interaction with Docker container
28+
- **Cross-platform**: Runs on Raspberry Pi, desktop computers, and cloud systems
29+
- **Web-based interface**: Browser access to REST API and control interface
30+
- **Image processing**: Integration with *Napari* and open-source image processing tools
31+
32+
### ImSwitch Docker Features
33+
34+
**What you can expect:**
35+
- **Headless Operation**: NO-QT (no PyQt/Qt dependency) version for server deployments
36+
- **Web Access**: Application exposed on port 8001 with browser-based control
37+
- **API Documentation**: Swagger GUI available at `https://localhost:8001/docs`
38+
- **React Interface**: Full-featured web app at `https://localhost:8001/imswitch/index.html`
39+
- **Configurable Setup**: Customize behavior using environment variables
40+
- **Camera Support**: Pre-built drivers for HIK cameras (tested on ARM devices)
41+
- **Multi-Architecture**: Support for ARM64 and X86 systems
42+
43+
**Screenshots:**
44+
45+
![Swagger UI Interface](../IMAGES/Docker_ImSwitch_1.png)
46+
*Swagger UI Interface of the ImSwitch Server*
47+
48+
![React Web App](../IMAGES/Docker_ImSwitch_2.png)
49+
*The React APP hosted via FastAPI endpoint (**ENSURE YOU HAVE ACCEPTED THE CERTIFICATE**)*
50+
51+
![CI/CD Pipeline](../IMAGES/Docker_ImSwitch_3.png)
52+
*Images built using CI with [GitHub Actions](https://github.com/openUC2/ImSwitch/blob/master/.github/workflows/imswitch-docker-multiarch-noqt.yaml)*
53+
54+
![Container Registry](../IMAGES/Docker_ImSwitch_4.png)
55+
*Docker Images hosted on [GitHub Container Registry](https://github.com/orgs/openUC2/packages?repo_name=ImSwitch)*
56+
2057
## Quick Start
2158

2259
### Prerequisites
@@ -25,23 +62,23 @@ ImSwitch runs as a Python application inside a Docker container with:
2562

2663
### One-Step Installation (Raspberry Pi/Debian)
2764

28-
For Debian-based systems, use the automated installation script:
65+
For Debian-based systems including Raspberry Pi, use the automated installation script that installs Docker, camera drivers, and pulls the ImSwitch container:
2966

3067
```bash
31-
# Clone the installation repository
32-
git clone https://github.com/openUC2/ImSwitchDockerInstall
33-
cd ImSwitchDockerInstall
34-
35-
# Run the installation script (installs Docker, drivers, docker and ImSwitch docker container)
68+
# Download and run the one-step installer
69+
wget https://raw.githubusercontent.com/openUC2/ImSwitchDockerInstall/master/install_all.sh
3670
chmod +x install_all.sh
3771
sudo ./install_all.sh
3872
```
3973

40-
This script installs:
41-
- Docker and required drivers
42-
- Camera drivers (HIK and others)
43-
- ImSwitch Docker container
44-
- All necessary dependencies
74+
This installer provides:
75+
- **Docker installation** and configuration
76+
- **Camera drivers** for HIK, Daheng, and USB cameras
77+
- **ImSwitch container** download and setup
78+
- **System configuration** for optimal performance
79+
- **Automatic startup** configuration
80+
81+
Repository: [openUC2/ImSwitchDockerInstall](https://github.com/openUC2/ImSwitchDockerInstall)
4582

4683
### Manual Installation
4784

docs/05_ImSwitch/Advanced/01_Installation/ForkLift.md

Lines changed: 84 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22

33
The ImSwitch ImSwitch OS is a complete, pre-configured operating system image designed specifically for UC2 microscopy systems. It provides a ready-to-use environment with all software, drivers, and configurations pre-installed.
44

5-
TODO:
6-
- Incorporate the images again that were there previouslyy
7-
- reuse previously set information about forklifted imswitch-os
8-
- recover images and information from this branch https://openuc2.github.io/docs/ImSwitch/Quickstart/
5+
## Images and Screenshots
6+
7+
The ImSwitch OS comes with a visual installer and desktop environment:
8+
9+
![ImSwitch OS Desktop](../IMAGES/ImSwitch-OS-1.png)
10+
*ImSwitch OS desktop environment with pre-installed applications*
11+
12+
![ImSwitch Configuration](../IMAGES/ImSwitch-OS-2.png)
13+
*ImSwitch configuration interface for hardware setup*
14+
15+
![ImSwitch Docker Interface](../IMAGES/ImSwitch-OS-3.png)
16+
*Docker containers running ImSwitch services*
917

1018
## Overview
1119

@@ -110,15 +118,15 @@ sudo raspi-config
110118

111119
### ImSwitch Configuration
112120

113-
TODO: Link to ImSwitchConfig explanition document
121+
For detailed information about ImSwitch configuration files, see the [Configuration Guide](../03_Configuration/README.md).
114122

115123
**Quick Start Configuration:**
116124
```bash
117125
# Navigate to configuration directory
118126
cd /home/pi/ImSwitchConfig
119127

120128
# Copy a template configuration
121-
TODO: update paths
129+
Configuration files are stored in `/home/pi/Documents/ImSwitchConfig/config/` and can be edited using the desktop interface or via SSH.
122130

123131
# Edit configuration for your hardware
124132
nano config/imcontrol_options.json #=> enter the name you want to use
@@ -132,7 +140,13 @@ The Forklift OS includes a web-based control interface accessible at:
132140
- **Local**: `http://localhost:8001`
133141
- **Network**: `http://opencu2-XXX-xxx-xxx.local:8001`
134142

135-
TODO: Add cockpit path for port 9090, socket on 8002,
143+
### Web Interfaces
144+
145+
The ImSwitch OS provides several web interfaces for remote access:
146+
147+
- **Cockpit Web Console**: Available at `http://[raspberry-pi-ip]:9090` for system administration
148+
- **ImSwitch React Interface**: Available at `http://[raspberry-pi-ip]:8001/imswitch/index.html` for microscope control
149+
- **WebSocket Control**: Available at `http://[raspberry-pi-ip]:8002` for real-time data streams
136150
actually it's https by default to connect to it via a statically hosted website e.g. https://youseetoo.github.io/imswitch/index.html
137151

138152
**Features:**
@@ -181,7 +195,47 @@ cp my_script.py /home/pi/ImSwitchConfig/scripts/
181195
docker ps
182196
```
183197

184-
TODO: recover previous information about docker compose
198+
### Docker Compose Services
199+
200+
The ImSwitch OS includes a pre-configured docker-compose setup with the following services:
201+
202+
```yaml
203+
version: '3.8'
204+
services:
205+
imswitch:
206+
image: ghcr.io/openuc2/imswitch-noqt-x64:latest
207+
ports:
208+
- "8001:8001"
209+
- "2222:22"
210+
environment:
211+
- HEADLESS=1
212+
- HTTP_PORT=8001
213+
- CONFIG_FILE=example_uc2_hik_flowstop.json
214+
- UPDATE_GIT=0
215+
- UPDATE_CONFIG=0
216+
volumes:
217+
- /home/pi/Documents/ImSwitchConfig:/config
218+
- /home/pi/Documents/ImSwitchData:/data
219+
privileged: true
220+
restart: unless-stopped
221+
222+
portainer:
223+
image: portainer/portainer-ce:latest
224+
ports:
225+
- "9000:9000"
226+
volumes:
227+
- /var/run/docker.sock:/var/run/docker.sock
228+
- portainer_data:/data
229+
restart: unless-stopped
230+
231+
volumes:
232+
portainer_data:
233+
```
234+
235+
This setup provides:
236+
- **ImSwitch**: Main microscopy control application
237+
- **Portainer**: Docker container management interface
238+
- **Persistent Data**: Configuration and data volumes for data retention
185239
186240
**Hardware not detected:**
187241
```bash
@@ -225,12 +279,31 @@ rm -rf /home/pi/ImSwitchConfig/config/*
225279

226280
### Manual Updates
227281

228-
load the latest version from github packages
229-
```
282+
For manual updates, use the provided update script:
283+
```bash
284+
# Update ImSwitch Docker containers
230285
bash ~/Desktop/update_docker_container.sh
286+
287+
# Or manually pull latest images
288+
sudo docker-compose down
289+
sudo docker pull ghcr.io/openuc2/imswitch-noqt-x64:latest
290+
sudo docker-compose up -d
231291
```
232292

233-
TODO: Update below
293+
### Update Components
294+
295+
```bash
296+
# Update ImSwitch configuration files
297+
cd /home/pi/Documents/ImSwitchConfig
298+
git pull origin master
299+
300+
# Update UC2-REST library
301+
pip install --upgrade UC2-REST
302+
303+
# Update ESP32 firmware tools
304+
cd /home/pi/uc2-esp32
305+
git pull origin main
306+
```
234307
## Support and Resources
235308

236309
### Getting Help

0 commit comments

Comments
 (0)