install
This commit is contained in:
@@ -26,7 +26,7 @@ d'analyse distantes.
|
|||||||
|---|---|
|
|---|---|
|
||||||
| Carte | Raspberry Pi 4 |
|
| Carte | Raspberry Pi 4 |
|
||||||
| Caméra | ArduCam haute définition |
|
| Caméra | ArduCam haute définition |
|
||||||
| Motorisation | Bras CNC piloté en GRBL |
|
| Motorisation | Bras CNC (L2544) piloté en GRBL |
|
||||||
| Grille de puits | 6×4 × 4 plaques multi-puits |
|
| Grille de puits | 6×4 × 4 plaques multi-puits |
|
||||||
| Réseau | LAN local — export Samba/rsync |
|
| Réseau | LAN local — export Samba/rsync |
|
||||||
|
|
||||||
@@ -49,6 +49,7 @@ d'analyse distantes.
|
|||||||
## Fonctionnalités
|
## Fonctionnalités
|
||||||
|
|
||||||
- Pilotage du bras CNC en GRBL — déplacement automatique puits par puits
|
- Pilotage du bras CNC en GRBL — déplacement automatique puits par puits
|
||||||
|
- calibration des multi-puits avec synchro base de données
|
||||||
- Acquisition image haute définition via ArduCam (OpenCV + Picamera2)
|
- Acquisition image haute définition via ArduCam (OpenCV + Picamera2)
|
||||||
- Stockage des frames en base time série ReductStore
|
- Stockage des frames en base time série ReductStore
|
||||||
- Sessions de scan paramétrables (grille complète ou sélection de puits)
|
- Sessions de scan paramétrables (grille complète ou sélection de puits)
|
||||||
@@ -58,6 +59,7 @@ d'analyse distantes.
|
|||||||
- Transfert automatique des exports vers machines distantes (Linux / Windows)
|
- Transfert automatique des exports vers machines distantes (Linux / Windows)
|
||||||
- Planification nocturne des exports via django-celery-beat
|
- Planification nocturne des exports via django-celery-beat
|
||||||
- Interface web temps réel (Django Channels / WebSocket)
|
- Interface web temps réel (Django Channels / WebSocket)
|
||||||
|
- Interface administration Django (sqlite3 ou mariadb ou postgresql)
|
||||||
- Suivi de progression des tâches longues par polling
|
- Suivi de progression des tâches longues par polling
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -85,35 +87,66 @@ Raspberry Pi 4
|
|||||||
|
|
||||||
> Documentation complète à venir.
|
> Documentation complète à venir.
|
||||||
|
|
||||||
```bash
|
Avec piImager installez PI OS 64-bits Trixie sur le raspberry pi4.<br>
|
||||||
git clone https://github.com/votre-repo/planarianscanner.git
|
Personnalisez votre raspberry avec au moins ssh (sshkey ou password)<br>
|
||||||
cd planarianscanner
|
Plus tard, par commodité vous installerez VNC server
|
||||||
|
|
||||||
python -m venv .venv
|
```bash
|
||||||
source .venv/bin/activate
|
ssh rpi4@ip.du.raspi
|
||||||
pip install -r requirements.txt
|
|
||||||
|
git clone https://github.com/votre-repo/planarianscanner.git
|
||||||
|
cd planarianscanner/etc
|
||||||
|
chmod +x *.sh
|
||||||
|
|
||||||
|
# compilation reductstore 15 mn sur le raspberry pi4
|
||||||
|
./cargo-reductstore-install.sh
|
||||||
|
|
||||||
|
# installation des librairies systèmes
|
||||||
|
./install-sys.sh
|
||||||
|
|
||||||
|
> samba configuration à venir.
|
||||||
|
|
||||||
|
# Configuration des applications Django
|
||||||
|
cd ../test-tube-scanner
|
||||||
|
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
# Éditer .env : SECRET_KEY, REDIS_URL, REDUCTSTORE_URL, ...
|
# Éditer .env : SECRET_KEY, REDIS_URL, REDUCTSTORE_URL, ...
|
||||||
|
|
||||||
|
./manage.py migrate
|
||||||
|
Si besoin:
|
||||||
|
./manage.py makemigrations
|
||||||
|
./manage.py migrate
|
||||||
|
|
||||||
|
# créer superadmin et tables
|
||||||
|
./manage.py init_data
|
||||||
|
./manage.py loaddata ../etc/scanner_configuration.json
|
||||||
|
./manage.py loaddata ../etc/well.json
|
||||||
|
./manage.py loaddata ../etc/multiwell.json
|
||||||
|
|
||||||
|
# tester
|
||||||
|
sudo supervisorctl stop test_tube:*
|
||||||
|
./manage.py runserver 0.0.0.0:8000
|
||||||
|
|
||||||
|
# tester en local
|
||||||
|
# http://127.0.0.1:8000
|
||||||
|
|
||||||
|
# tester en distant
|
||||||
|
# http://ip.du.raspi:8000
|
||||||
|
|
||||||
|
# fin du test
|
||||||
|
sudo supervisorctl restart test_tube:*
|
||||||
|
|
||||||
python manage.py migrate
|
|
||||||
python manage.py createsuperuser
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Démarrage des services :
|
Démarrage des services :
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Django + Channels
|
Tous les services sont accessibles depuis supervisor
|
||||||
python manage.py runserver
|
http://root:toor@ip-du-raspi:9001
|
||||||
|
ou
|
||||||
|
sudo supervisorctl start|stop|restart reductstore
|
||||||
|
sudo supervisorctl start|stop|restart test_tube:*
|
||||||
|
|
||||||
# Worker Celery
|
|
||||||
celery -A planarianscanner worker -l info
|
|
||||||
|
|
||||||
# Scheduler (exports nocturnes)
|
|
||||||
celery -A planarianscanner beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
|
|
||||||
|
|
||||||
# Redis (si non géré par systemd)
|
|
||||||
redis-server
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ sudo apt -y install build-essential openssl git pkg-config redis supervisor sqli
|
|||||||
echo "==== python3 install"
|
echo "==== python3 install"
|
||||||
sudo apt -y install python3-dev python3-pip python3-venv default-libmysqlclient-dev libmariadb-dev libpq-dev python3-picamera2
|
sudo apt -y install python3-dev python3-pip python3-venv default-libmysqlclient-dev libmariadb-dev libpq-dev python3-picamera2
|
||||||
|
|
||||||
echo "==== supervisor http access config"
|
echo "==== supervisor http access login:pass => root:toor"
|
||||||
sudo cp supervisor-inet_http.conf /etc/supervisor/conf.d/
|
sudo cp supervisor-inet_http.conf /etc/supervisor/conf.d/
|
||||||
sudo ln -s scanner_service.conf /etc/supervisor/conf.d/
|
sudo ln -s scanner_service.conf /etc/supervisor/conf.d/
|
||||||
sudo ln -s reductstore_service.conf /etc/supervisor/conf.d/
|
sudo ln -s reductstore_service.conf /etc/supervisor/conf.d/
|
||||||
|
|||||||
Reference in New Issue
Block a user