pkg download command and patches
This commit is contained in:
20
assets/var/gnu/unitprint/backend-local.md
Normal file
20
assets/var/gnu/unitprint/backend-local.md
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cargo new backend-local
|
||||
|
||||
|
||||
``` cfg *** run deps ***
|
||||
cups
|
||||
cups-filters
|
||||
foomatic-db
|
||||
foomatic-db-engine
|
||||
hplip
|
||||
```
|
||||
|
||||
Для раздачи инета службу поднять/конфиг сделать под unitprint ей
|
||||
0
assets/var/gnu/unitprint/backend.md
Normal file
0
assets/var/gnu/unitprint/backend.md
Normal file
0
assets/var/gnu/unitprint/backend/scan.md
Normal file
0
assets/var/gnu/unitprint/backend/scan.md
Normal file
60
assets/var/gnu/unitprint/backend/scan/DocRes.md
Normal file
60
assets/var/gnu/unitprint/backend/scan/DocRes.md
Normal file
@ -0,0 +1,60 @@
|
||||
unitprint/backend/scan/DocRes
|
||||
=
|
||||
https://github.com/ZZZHANG-jx/DocRes.git
|
||||
|
||||
``` sh *** build ***
|
||||
mv * ..
|
||||
```
|
||||
|
||||
``` sh *** config ***
|
||||
ln -sf /pkg/gnu/unitprint/backend/scan/venv
|
||||
source venv/bin/activate
|
||||
pip install einops scikit-image opencv-python-headless tqdm
|
||||
```
|
||||
|
||||
``` sh *** upload_weights ***
|
||||
mkdir -p data/weights
|
||||
#rsync -avz ~/Downloads/mbd.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
|
||||
#rsync -avz ~/Downloads/docres.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
|
||||
```
|
||||
|
||||
mkdir -p ~/.config/miopen
|
||||
export MIOPEN_USER_DB_PATH="/root/.config/miopen"
|
||||
export MIOPEN_FIND_MODE=3
|
||||
export HIP_VISIBLE_DEVICES=0
|
||||
|
||||
time ../../venv/bin/python inference.py \
|
||||
--task deshadowing \
|
||||
--im_path ./IMG_20260905_172410_rec.jpg \
|
||||
--out_folder ./
|
||||
|
||||
time python inference.py \
|
||||
--task appearance \
|
||||
--im_path ./output_pipeline/IMG_20260905_172410_rec_deshadowing.png \
|
||||
--out_folder ./output_pipeline
|
||||
|
||||
time python inference.py \
|
||||
--task deblurring \
|
||||
--im_path ./output_pipeline/IMG_20260905_172410_rec_deshadowing_appearance.png \
|
||||
--out_folder ./output_pipeline
|
||||
|
||||
time python inference.py \
|
||||
--task deblurring \
|
||||
--im_path ../../DocScanner/src/rectified/IMG_20260905_172410_rec.png \
|
||||
--out_folder ./output_pipeline
|
||||
|
||||
time python inference.py \
|
||||
--task appearance \
|
||||
--im_path ./output_pipeline/IMG_20260905_172410_rec_deblurring.png \
|
||||
--out_folder ./output_pipeline
|
||||
|
||||
# 3. Appearance
|
||||
time python inference.py \
|
||||
--task appearance \
|
||||
--im_path ./output_pipeline/IMG_20260905_172410_rec_deshadowing.png \
|
||||
--out_folder ./output_pipeline
|
||||
|
||||
time python inference.py \
|
||||
--task dewarping \
|
||||
--im_path /pkg/gnu/unitprint/DocScanner/src/distorted/IMG_20260905_172410.jpg \
|
||||
--out_folder ./output_pipeline
|
||||
23
assets/var/gnu/unitprint/backend/scan/DocScanner.md
Normal file
23
assets/var/gnu/unitprint/backend/scan/DocScanner.md
Normal file
@ -0,0 +1,23 @@
|
||||
unitprint/backend/scan/DocScanner
|
||||
=
|
||||
https://root-kit.ru/UnitPrint/scan-DocScanner.git
|
||||
|
||||
``` sh *** build ***
|
||||
mv * ..
|
||||
```
|
||||
|
||||
``` sh *** config ***
|
||||
ln -sf /pkg/gnu/unitprint/backend/scan/venv
|
||||
source venv/bin/activate
|
||||
pip install pip setuptools wheel
|
||||
ROCM_SDK_TARGETS="gfx1150" pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm7.14
|
||||
pip install numpy opencv-python Pillow scikit-image tqdm natsort matplotlib
|
||||
```
|
||||
|
||||
``` sh *** upload_weights ***
|
||||
source venv/bin/activate
|
||||
pip install gdown
|
||||
gdown --folder "https://drive.google.com/drive/folders/1W1_DJU8dfEh6FqDYqFQ7ypR38Z8c5r4D"
|
||||
mkdir -p model_pretrained
|
||||
mv DocScanner-L-Model/*.pth model_pretrained/
|
||||
```
|
||||
12
assets/var/gnu/unitprint/certs.md
Normal file
12
assets/var/gnu/unitprint/certs.md
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
chgrp -R nginx /pkg/gnu/unitprint/certs
|
||||
chmod 750 /pkg/gnu/unitprint/certs
|
||||
chmod 640 /pkg/gnu/unitprint/certs/fullchain.pem
|
||||
chmod 640 /pkg/gnu/unitprint/certs/fullchain.pem
|
||||
|
||||
|
||||
# free bsd
|
||||
rsync -aL root@d:/usr/local/etc/letsencrypt/live/unitprint.ru/fullchain.pem /pkg/gnu/unitprint/certs/
|
||||
rsync -aL root@d:/usr/local/etc/letsencrypt/live/unitprint.ru/privkey.pem /pkg/gnu/unitprint/certs/
|
||||
|
||||
14
assets/var/gnu/unitprint/openclaw.md
Normal file
14
assets/var/gnu/unitprint/openclaw.md
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
``` env *** env ***
|
||||
TZ=Europe/Moscow
|
||||
OPENCLAW_STATE_DIR=/pkg/gnu/unitprint/openclaw/var
|
||||
OPENCLAW_CONFIG_PATH=/pkg/gnu/unitprint/openclaw/etc/openclaw.json
|
||||
HTTP_PROXY=http://127.0.0.1:12334
|
||||
HTTPS_PROXY=http://127.0.0.1:12334
|
||||
```
|
||||
|
||||
``` sh *** config ***
|
||||
openclaw --profile unitprint onboard --install-daemon
|
||||
openclaw config set agents.defaults.workspace /pkg/gnu/unitprint/openclaw/var/workspace
|
||||
openclaw --profile unitprint config set gateway.port 18790
|
||||
```
|
||||
28
assets/var/gnu/unitprint/slint-app.md
Normal file
28
assets/var/gnu/unitprint/slint-app.md
Normal file
@ -0,0 +1,28 @@
|
||||
unitprint/slint-app
|
||||
=
|
||||
|
||||
``` sh *** build ***
|
||||
cmake -DCMAKE_INSTALL_PREFIX="$pkgpath" \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DSLINT_STYLE=cosmic \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_CXX_FLAGS="-fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--gc-sections -Wl,--strip-all -Wl,-z,norelro" \
|
||||
-G Ninja ..
|
||||
ninja
|
||||
ninja install
|
||||
```
|
||||
|
||||
``` sh *** test_xz ***
|
||||
xz -9e -k --check=crc32 slint_test && du -sh slint_test.xz
|
||||
```
|
||||
|
||||
``` sh *** test_symbols ***
|
||||
strings slint_test | grep -c '<svg'
|
||||
readelf -S slint_test | grep -c COMDAT
|
||||
nm -C --defined-only slint_test
|
||||
|
||||
strings slint_test | grep -c 'PNG'
|
||||
objdump -s -j .rodata slint_test | head -100
|
||||
size -A slint_test | grep -E 'eh_frame|gcc_except'
|
||||
```
|
||||
20
assets/var/gnu/unitprint/web-app.md
Normal file
20
assets/var/gnu/unitprint/web-app.md
Normal file
@ -0,0 +1,20 @@
|
||||
unitprint/web-app
|
||||
=
|
||||
ssh://git@root-kit.ru:17458/UnitPrint/web-app.git
|
||||
|
||||
``` env *** env ***
|
||||
save_source=true
|
||||
```
|
||||
|
||||
``` sh *** build ***
|
||||
ls
|
||||
```
|
||||
|
||||
``` sh *** init ***
|
||||
cd src
|
||||
npm create vite@latest . -- --template svelte --no-interactive --overwrite
|
||||
npm install
|
||||
```
|
||||
|
||||
chmod o+x /pkg/gnu/unitprint
|
||||
chown -R nginx:nginx /pkg/gnu/unitprint/web-app/dist
|
||||
Reference in New Issue
Block a user