summaryrefslogtreecommitdiffstats
path: root/README.txt
blob: d01e54557ff666f3eefd4201b0d5e2cdf30843e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
RUN:

Run with no logs: GGML_LOG_LEVEL=0 ./lex
Run with error logs: GGML_LOG_LEVEL=error ./lex

TEST

# slowcgi -d -v -s /var/www/run/slowcgi_debug.sock

Without PGP:

# echo -n "body-mime=hello%20world" | chroot -u www /var/www /usr/bin/perl -e '
  $ENV{CONTENT_TYPE}   = "application/x-www-form-urlencoded";
  $ENV{CONTENT_LENGTH} = 23; 
  $ENV{REMOTE_ADDR}    = "127.0.0.1";
  $ENV{HTTP_USER_AGENT}= "test-cli";
  do "/cgi-bin/lex.cgi";
  print $@ if $@; 
'

CHROOT:

# Create the jail root
mkdir -p /var/empty/dict_jail/dev

# Copy or move your model file into the jail
cp Qwen2.5-7B-Instruct-Q4_K_M.gguf /var/empty/dict_jail/

# Create necessary device nodes inside the jail
mknod -m 666 /var/empty/dict_jail/dev/null c 2 2
mknod -m 666 /var/empty/dict_jail/dev/zero c 2 12

# Fix permissions so 'nobody' can read the model file
chown -R root:wheel /var/empty/dict_jail
chmod 755 /var/empty/dict_jail
chmod 644 /var/empty/dict_jail/Qwen2.5-7B-Instruct-Q4_K_M.gguf

SERVER

Set up chroot.

  1. Create symlink to slowcgi: $ ln -s /etc/rc.d/slowcgi /etc/rc.d/slowcgi_lex
  2.