second commit

This commit is contained in:
2026-04-13 23:14:05 +02:00
parent 1c031ebf63
commit e08597fc72
125 changed files with 26221 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
!/bin/bash
echo "--- install reductstore"
sudo apt install libprotobuf-dev protobuf-compiler
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source .cargo/env
cargo --version
rustc --version
cargo install reductstore
+36
View File
@@ -0,0 +1,36 @@
!/bin/bash
echo "==== System installation for rpi 4/5"
echo
sudo apt update
#sudo apt upgrade
# system
echo "==== system essential"
sudo apt -y install build-essential openssl git pkg-config redis supervisor sqlitebrowser samba-client cifs-utils
echo "==== python3 install"
sudo apt -y install python3-dev python3-pip python3-venv default-libmysqlclient-dev libmariadb-dev libpq-dev python3-picamera2
echo "==== supervisor http access config"
sudo cp supervisor-inet_http.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/
echo "==== restart supervisor "
sudo systemctl restart supervisor
echo "==== python env with system site packages for picamera2"
rm -rf ../.venv
python -m venv --system-site-packages ../.venv
source ../.venv/bin/activate
echo "==== pip requirements"
pip install -r ./requirements.txt
echo "==== restart services if possible"
sudo supervisorctl reread && sudo supervisorctl update
echo "==== End "
echo
+13
View File
@@ -0,0 +1,13 @@
[program:reductstore]
process_name=%(program_name)s
priority=10
environment=RS_DATA_PATH="/home/rpi4/medias"
directory=/home/rpi4/medias
command=/home/rpi4/.cargo/bin/reductstore
user=rpi4
group=rpi4
stopasgroup=true
stopsignal=SIGINT
autostart=true
autorestart=true
+21
View File
@@ -0,0 +1,21 @@
django
pillow
django-timezone-field
django-resized
django-colorfield
django-celery-beat
django-celery-results
channels[daphne]
channels-redis
twisted[tls,http2]
celery[redis]
python-decouple
PyYaml
reduct-py
python-dateutil
psutil
posix_ipc
opencv-python-headless
mysqlclient
psycopg2
pyserial
+17
View File
@@ -0,0 +1,17 @@
Montage samba:
=============
sudo nano /etc/samba/.smb_creds
username=user_windows
password=mot_de_passe
domain=WORKGROUP
sudo chmod 600 /etc/samba/.smb_creds
sudo chown root:root /etc/samba/.smb_creds
sudo mkdir -p /mnt/exports
sudo chown django:django /mnt/exports
sudo nano /etc/fstab
//192.168.1.210/scanner /mnt/exports_cam cifs credentials=/etc/samba/.smb_creds,uid=django,gid=django,file_mode=0664,dir_mode=0775,iocharset=utf8,vers=3.0,_netdev,nofail 0 0
+1
View File
@@ -0,0 +1 @@
[{"model": "scanner.configuration", "pk": 1, "fields": {"name": "Configuration par défaut", "author": 1, "sidebar_width": "360px", "default_grid_columns": 3, "opencv_fourcc_format": "mp4v", "opencv_video_type": "mp4", "grbl_xmax": 350.0, "grbl_ymax": 250.0, "use_rpicam": true, "webcam_device_index": 2, "image_quality": 90, "video_jpeg_quality": 90, "video_frame_rate": 5.0, "video_width_capture": 2028, "video_height_capture": 1520, "calibration_crop_radius": 512, "calibration_default_multiwell": "HG", "calibration_default_feed": 1000, "calibration_default_step": 1.0, "active": true}}]
+1
View File
@@ -0,0 +1 @@
[{"model": "scanner.multiwell", "pk": 2, "fields": {"label": "Haut gauche", "position": "HG", "duration": 1, "order": 2, "xbase": 51.0, "ybase": 119.25, "cols": 6, "rows": 4, "dx": 19.55, "dy": 19.55, "feed": 1000, "active": true}}, {"model": "scanner.multiwell", "pk": 3, "fields": {"label": "Haut droit", "position": "HD", "duration": 1, "order": 0, "xbase": 36.0, "ybase": 97.25, "cols": 6, "rows": 4, "dx": 19.55, "dy": 19.55, "feed": 1000, "active": true}}, {"model": "scanner.multiwell", "pk": 4, "fields": {"label": "Bas gauche", "position": "BG", "duration": 1, "order": 3, "xbase": 36.0, "ybase": 97.25, "cols": 6, "rows": 4, "dx": 19.55, "dy": 19.55, "feed": 1000, "active": true}}, {"model": "scanner.multiwell", "pk": 5, "fields": {"label": "Bas droit", "position": "BD", "duration": 1, "order": 1, "xbase": 36.0, "ybase": 97.25, "cols": 6, "rows": 4, "dx": 19.55, "dy": 19.55, "feed": 1000, "active": true}}]
+46
View File
@@ -0,0 +1,46 @@
[group:test_tube]
programs=scanner,beat,workers
[program:scanner]
process_name=%(program_name)s
priority=500
directory=/home/rpi4/django-test-tube-scanner/test_tube_scanner
command=
/home/rpi4/django-test-tube-scanner/.venv/bin/daphne
-b 0.0.0.0
-p 8000
home.asgi:application
user=rpi4
group=rpi4
stopasgroup=true
stopsignal=SIGINT
autostart=true
autorestart=true
redirect_stderr=true
[program:beat]
process_name=%(program_name)s
priority=800
directory=/home/rpi4/django-test-tube-scanner/test_tube_scanner
command=/home/rpi4/django-test-tube-scanner/.venv/bin/celery -A home beat -l info
user=rpi4
group=rpi4
stopasgroup=true
stopsignal=SIGINT
autostart=true
autorestart=true
redirect_stderr=true
[program:workers]
process_name=%(program_name)s
priority=900
directory=/home/rpi4/django-test-tube-scanner/test_tube_scanner
command=/home/rpi4/django-test-tube-scanner/run-workers.sh
user=rpi4
group=rpi4
stopasgroup=true
stopsignal=SIGINT
autostart=true
autorestart=true
redirect_stderr=true
+1
View File
@@ -0,0 +1 @@
[{"model": "scanner.well", "pk": 1, "fields": {"author": 1, "name": "A1"}}, {"model": "scanner.well", "pk": 2, "fields": {"author": 1, "name": "A2"}}, {"model": "scanner.well", "pk": 3, "fields": {"author": 1, "name": "A3"}}, {"model": "scanner.well", "pk": 4, "fields": {"author": 1, "name": "A4"}}, {"model": "scanner.well", "pk": 5, "fields": {"author": 1, "name": "A5"}}, {"model": "scanner.well", "pk": 6, "fields": {"author": 1, "name": "A6"}}, {"model": "scanner.well", "pk": 7, "fields": {"author": 1, "name": "B1"}}, {"model": "scanner.well", "pk": 8, "fields": {"author": 1, "name": "B2"}}, {"model": "scanner.well", "pk": 9, "fields": {"author": 1, "name": "B3"}}, {"model": "scanner.well", "pk": 10, "fields": {"author": 1, "name": "B4"}}, {"model": "scanner.well", "pk": 11, "fields": {"author": 1, "name": "B5"}}, {"model": "scanner.well", "pk": 12, "fields": {"author": 1, "name": "B6"}}, {"model": "scanner.well", "pk": 13, "fields": {"author": 1, "name": "C1"}}, {"model": "scanner.well", "pk": 14, "fields": {"author": 1, "name": "C2"}}, {"model": "scanner.well", "pk": 15, "fields": {"author": 1, "name": "C3"}}, {"model": "scanner.well", "pk": 16, "fields": {"author": 1, "name": "C4"}}, {"model": "scanner.well", "pk": 17, "fields": {"author": 1, "name": "C5"}}, {"model": "scanner.well", "pk": 18, "fields": {"author": 1, "name": "C6"}}, {"model": "scanner.well", "pk": 19, "fields": {"author": 1, "name": "D1"}}, {"model": "scanner.well", "pk": 20, "fields": {"author": 1, "name": "D2"}}, {"model": "scanner.well", "pk": 21, "fields": {"author": 1, "name": "D3"}}, {"model": "scanner.well", "pk": 22, "fields": {"author": 1, "name": "D4"}}, {"model": "scanner.well", "pk": 23, "fields": {"author": 1, "name": "D5"}}, {"model": "scanner.well", "pk": 24, "fields": {"author": 1, "name": "D6"}}]
+4
View File
@@ -0,0 +1,4 @@
[inet_http_server]
port=*:9001
username=root
password=toor