fix: redundant searxng folder causing error on ubuntu, tts issue, bigger mount point allowed by start_services, readme updated for cli mode
This commit is contained in:
@@ -277,6 +277,12 @@ To run with CLI interface you would have to install package on host:
|
|||||||
./install.bat # windows
|
./install.bat # windows
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Then you must change the SEARXNG_BASE_URL in `config.ini` to:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
SEARXNG_BASE_URL="http://localhost:8080"
|
||||||
|
```
|
||||||
|
|
||||||
Start required services. This will start some services from the docker-compose.yml, including:
|
Start required services. This will start some services from the docker-compose.yml, including:
|
||||||
- searxng
|
- searxng
|
||||||
- redis (required by searxng)
|
- redis (required by searxng)
|
||||||
@@ -287,6 +293,8 @@ Start required services. This will start some services from the docker-compose.y
|
|||||||
start start_services.cmd # Window
|
start start_services.cmd # Window
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Run: uv run: `uv run python -m ensurepip` to ensure uv has pip enabled.
|
||||||
|
|
||||||
Use the CLI: `uv run cli.py`
|
Use the CLI: `uv run cli.py`
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ services:
|
|||||||
- SEARXNG_BASE_URL=http://localhost:8080/
|
- SEARXNG_BASE_URL=http://localhost:8080/
|
||||||
- UWSGI_WORKERS=1
|
- UWSGI_WORKERS=1
|
||||||
- UWSGI_THREADS=1
|
- UWSGI_THREADS=1
|
||||||
|
user: "1000:1000" # Run as current user to avoid permission issues
|
||||||
cap_add:
|
cap_add:
|
||||||
- CHOWN
|
- CHOWN
|
||||||
- SETGID
|
- SETGID
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
[real_ip]
|
|
||||||
|
|
||||||
# Number of values to trust for X-Forwarded-For.
|
|
||||||
|
|
||||||
x_for = 1
|
|
||||||
|
|
||||||
# The prefix defines the number of leading bits in an address that are compared
|
|
||||||
# to determine whether or not an address is part of a (client) network.
|
|
||||||
|
|
||||||
ipv4_prefix = 32
|
|
||||||
ipv6_prefix = 48
|
|
||||||
|
|
||||||
[botdetection.ip_limit]
|
|
||||||
|
|
||||||
# To get unlimited access in a local network, by default link-local addresses
|
|
||||||
# (networks) are not monitored by the ip_limit
|
|
||||||
filter_link_local = false
|
|
||||||
|
|
||||||
# activate link_token method in the ip_limit method
|
|
||||||
link_token = false
|
|
||||||
|
|
||||||
[botdetection.ip_lists]
|
|
||||||
|
|
||||||
# In the limiter, the ip_lists method has priority over all other methods -> if
|
|
||||||
# an IP is in the pass_ip list, it has unrestricted access and it is also not
|
|
||||||
# checked if e.g. the "user agent" suggests a bot (e.g. curl).
|
|
||||||
|
|
||||||
block_ip = [
|
|
||||||
# '93.184.216.34', # IPv4 of example.org
|
|
||||||
# '257.1.1.1', # invalid IP --> will be ignored, logged in ERROR class
|
|
||||||
]
|
|
||||||
|
|
||||||
pass_ip = [
|
|
||||||
# '192.168.0.0/16', # IPv4 private network
|
|
||||||
# 'fe80::/10' # IPv6 linklocal / wins over botdetection.ip_limit.filter_link_local
|
|
||||||
]
|
|
||||||
|
|
||||||
# Activate passlist of (hardcoded) IPs from the SearXNG organization,
|
|
||||||
# e.g. `check.searx.space`.
|
|
||||||
pass_searxng_org = true
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,52 +0,0 @@
|
|||||||
[uwsgi]
|
|
||||||
# Who will run the code
|
|
||||||
uid = searxng
|
|
||||||
gid = searxng
|
|
||||||
|
|
||||||
# Number of workers (usually CPU count)
|
|
||||||
# default value: %k (= number of CPU core, see Dockerfile)
|
|
||||||
workers = 4
|
|
||||||
|
|
||||||
# Number of threads per worker
|
|
||||||
# default value: 4 (see Dockerfile)
|
|
||||||
threads = 4
|
|
||||||
|
|
||||||
# The right granted on the created socket
|
|
||||||
chmod-socket = 666
|
|
||||||
|
|
||||||
# Plugin to use and interpreter config
|
|
||||||
single-interpreter = true
|
|
||||||
master = true
|
|
||||||
plugin = python3
|
|
||||||
lazy-apps = true
|
|
||||||
enable-threads = 4
|
|
||||||
|
|
||||||
# Module to import
|
|
||||||
module = searx.webapp
|
|
||||||
|
|
||||||
# Virtualenv and python path
|
|
||||||
pythonpath = /usr/local/searxng/
|
|
||||||
chdir = /usr/local/searxng/searx/
|
|
||||||
|
|
||||||
# automatically set processes name to something meaningful
|
|
||||||
auto-procname = true
|
|
||||||
|
|
||||||
# Disable request logging for privacy
|
|
||||||
disable-logging = true
|
|
||||||
log-5xx = true
|
|
||||||
|
|
||||||
# Set the max size of a request (request-body excluded)
|
|
||||||
buffer-size = 8192
|
|
||||||
|
|
||||||
# No keep alive
|
|
||||||
# See https://github.com/searx/searx-docker/issues/24
|
|
||||||
add-header = Connection: close
|
|
||||||
|
|
||||||
# Follow SIGTERM convention
|
|
||||||
# See https://github.com/searxng/searxng/issues/3427
|
|
||||||
die-on-term
|
|
||||||
|
|
||||||
# uwsgi serves the static files
|
|
||||||
static-map = /static=/usr/local/searxng/searx/static
|
|
||||||
static-gzip-all = True
|
|
||||||
offload-threads = 4
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
from kokoro import KPipeline
|
||||||
|
from IPython.display import display, Audio
|
||||||
|
import soundfile as sf
|
||||||
@@ -63,6 +63,7 @@ class Speech():
|
|||||||
voice_idx (int, optional): Index of the voice to use from the voice map.
|
voice_idx (int, optional): Index of the voice to use from the voice map.
|
||||||
"""
|
"""
|
||||||
if not self.pipeline or not IMPORT_FOUND:
|
if not self.pipeline or not IMPORT_FOUND:
|
||||||
|
print("Pipeline disabled.")
|
||||||
return
|
return
|
||||||
if voice_idx >= len(self.voice_map[self.language]):
|
if voice_idx >= len(self.voice_map[self.language]):
|
||||||
pretty_print("Invalid voice number, using default voice", color="error")
|
pretty_print("Invalid voice number, using default voice", color="error")
|
||||||
|
|||||||
+4
-4
@@ -16,7 +16,7 @@ else
|
|||||||
dir_size_bytes=$(du -s --bytes "$WORK_DIR" 2>/dev/null | awk '{print $1}')
|
dir_size_bytes=$(du -s --bytes "$WORK_DIR" 2>/dev/null | awk '{print $1}')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
max_size_bytes=$((2 * 1024 * 1024 * 1024))
|
max_size_bytes=$((2 * 1024 * 1024 * 1024 * 10))
|
||||||
|
|
||||||
echo "Mounting $WORK_DIR ($dir_size_bytes bytes) to docker."
|
echo "Mounting $WORK_DIR ($dir_size_bytes bytes) to docker."
|
||||||
|
|
||||||
@@ -71,10 +71,10 @@ if ! command_exists docker-compose && ! docker compose version >/dev/null 2>&1;
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command_exists docker-compose; then
|
if command_exists docker compose; then
|
||||||
COMPOSE_CMD="docker-compose"
|
|
||||||
else
|
|
||||||
COMPOSE_CMD="docker compose"
|
COMPOSE_CMD="docker compose"
|
||||||
|
else
|
||||||
|
COMPOSE_CMD="docker-compose"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if docker-compose.yml exists
|
# Check if docker-compose.yml exists
|
||||||
|
|||||||
Reference in New Issue
Block a user