Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7eabb2777d | |||
| af1706aa88 | |||
| e52a0d0b71 | |||
| 6605456b94 |
4
.env
4
.env
@ -1,5 +1,5 @@
|
||||
ENV_CODE = "dev"
|
||||
PORT=8502
|
||||
ENV_CODE = "public"
|
||||
PORT=8501
|
||||
DOT_FILE = "schema.txt"
|
||||
GITEA_URL = "https://fabnum-git.peccini.fr/api/v1"
|
||||
ORGANISATION = "fabnum"
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,6 +26,7 @@ venv/
|
||||
Local/
|
||||
HTML/
|
||||
Corpus/
|
||||
pgpt/
|
||||
|
||||
# Ignorer données Fiches (adapté à ton projet)
|
||||
Fiches/
|
||||
|
||||
31
batch_ia/batch-fabnum.service
Normal file
31
batch_ia/batch-fabnum.service
Normal file
@ -0,0 +1,31 @@
|
||||
[Unit]
|
||||
Description=Service batch IA pour utilisateur fabnum
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=fabnum
|
||||
WorkingDirectory=/home/fabnum/fabnum-public/batch_ia
|
||||
Environment=PYTHONPATH=/home/fabnum/fabnum-public
|
||||
ExecStart=/home/fabnum/fabnum-public/venv/bin/python /home/fabnum/fabnum-public/batch_ia/batch_runner.py
|
||||
Restart=always
|
||||
Nice=10
|
||||
CPUSchedulingPolicy=batch
|
||||
|
||||
# Limites de ressources
|
||||
CPUQuota=87.5% # ~14 cores sur 16
|
||||
MemoryMax=12G # RAM maximale autorisée
|
||||
TasksMax=1 # maximum 1 subprocess/thread simultané
|
||||
|
||||
# Sécurité renforcée
|
||||
ProtectSystem=full
|
||||
ReadWritePaths=/home/fabnum/fabnum-public/batch_ia
|
||||
|
||||
# Journal propre
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
# semanage fcontext -a -t svirt_sandbox_file_t "/home/fabnum/fabnum-dev/batch_ia(/.*)?"
|
||||
@ -3,6 +3,14 @@ import time
|
||||
from pathlib import Path
|
||||
from networkx.drawing.nx_agraph import write_dot
|
||||
import streamlit as st
|
||||
import sys
|
||||
import os
|
||||
|
||||
current_file = os.path.realpath(__file__)
|
||||
parent_dir = os.path.abspath(os.path.join(os.path.dirname(current_file), '..'))
|
||||
if parent_dir not in sys.path:
|
||||
sys.path.insert(0, parent_dir)
|
||||
|
||||
from utils.translations import _
|
||||
|
||||
BATCH_DIR = Path(__file__).resolve().parent
|
||||
|
||||
0
utils/__init__.py
Normal file
0
utils/__init__.py
Normal file
Loading…
x
Reference in New Issue
Block a user