Compare commits
2 commits
608ae4bdb1
...
3315198bab
| Author | SHA1 | Date | |
|---|---|---|---|
| 3315198bab | |||
| 1e94a2856a |
4 changed files with 8 additions and 8 deletions
|
|
@ -78,7 +78,7 @@ async fn main() -> std::io::Result<()> {
|
||||||
|
|
||||||
App::new()
|
App::new()
|
||||||
.wrap(Logger::default())
|
.wrap(Logger::default())
|
||||||
.wrap(Logger::new("%a %{User-Agent}i"))
|
.wrap(Logger::new("HTTP REQUEST: %a %{User-Agent}i"))
|
||||||
.app_data(app_state.clone())
|
.app_data(app_state.clone())
|
||||||
.service(upload_file)
|
.service(upload_file)
|
||||||
.service(list_file)
|
.service(list_file)
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,13 @@ lxc config device add pragmatismo-dns dns-tcp proxy listen=tcp:$GB_PUBLIC_IP:53
|
||||||
|
|
||||||
lxc exec "${PARAM_TENANT}-dns" -- bash -c "
|
lxc exec "${PARAM_TENANT}-dns" -- bash -c "
|
||||||
mkdir /opt/gbo
|
mkdir /opt/gbo
|
||||||
mkdir /opt/gbo/{bin,conf,data,logs}
|
mkdir /opt/gbo/{bin,conf,data,logs}
|
||||||
|
|
||||||
echo 'nameserver 8.8.8.8' > /etc/resolv.conf
|
echo 'nameserver 8.8.8.8' > /etc/resolv.conf
|
||||||
|
|
||||||
|
|
||||||
apt-get upgrade -y && apt-get install -y wget
|
apt-get upgrade -y && apt-get install -y wget
|
||||||
wget -qO /opt/gbo/bin/coredns https://github.com/coredns/coredns/releases/download/v1.11.1/coredns_1.11.1_linux_amd64.tgz
|
wget -qO /opt/gbo/bin/coredns https://github.com/coredns/coredns/releases/download/v1.12.4/coredns_1.12.4_linux_amd64.tgz
|
||||||
tar -xzf /opt/gbo/bin/coredns -C /opt/gbo/bin/
|
tar -xzf /opt/gbo/bin/coredns -C /opt/gbo/bin/
|
||||||
useradd --system --no-create-home --shell /bin/false gbuser
|
useradd --system --no-create-home --shell /bin/false gbuser
|
||||||
setcap cap_net_bind_service=+ep /opt/gbo/bin/coredns
|
setcap cap_net_bind_service=+ep /opt/gbo/bin/coredns
|
||||||
|
|
@ -85,4 +85,4 @@ lxc config device add "${PARAM_TENANT}-dns" dnsdata disk source="$HOST_DATA" pat
|
||||||
lxc config device add "${PARAM_TENANT}-dns" dnsconf disk source="$HOST_CONF" path=/opt/gbo/conf
|
lxc config device add "${PARAM_TENANT}-dns" dnsconf disk source="$HOST_CONF" path=/opt/gbo/conf
|
||||||
lxc config device add "${PARAM_TENANT}-dns" dnslogs disk source="$HOST_LOGS" path=/opt/gbo/logs
|
lxc config device add "${PARAM_TENANT}-dns" dnslogs disk source="$HOST_LOGS" path=/opt/gbo/logs
|
||||||
|
|
||||||
lxc exec "${PARAM_TENANT}-dns" -- systemctl start dns
|
lxc exec "${PARAM_TENANT}-dns" -- systemctl start dns
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,9 @@ mkdir -p /opt/gbo/logs /opt/gbo/bin /opt/gbo/data /opt/gbo/conf
|
||||||
chown -R gbuser:gbuser /opt/gbo/
|
chown -R gbuser:gbuser /opt/gbo/
|
||||||
|
|
||||||
wget https://github.com/ggml-org/llama.cpp/releases/download/b6148/llama-b6148-bin-ubuntu-x64.zip
|
wget https://github.com/ggml-org/llama.cpp/releases/download/b6148/llama-b6148-bin-ubuntu-x64.zip
|
||||||
mkdir llama.cpp
|
mkdir llm
|
||||||
mv llama-b6148-bin-ubuntu-x64.zip llama.cpp
|
mv llama-b6148-bin-ubuntu-x64.zip llm
|
||||||
cd llama.cpp
|
cd llm
|
||||||
unzip llama-b6148-bin-ubuntu-x64.zip
|
unzip llama-b6148-bin-ubuntu-x64.zip
|
||||||
mv build/bin/* .
|
mv build/bin/* .
|
||||||
rm build/bin -r
|
rm build/bin -r
|
||||||
|
|
|
||||||
|
|
@ -431,7 +431,7 @@ struct LlamaCppEmbeddingRequest {
|
||||||
// FIXED: Handle the stupid nested array format
|
// FIXED: Handle the stupid nested array format
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
struct LlamaCppEmbeddingResponseItem {
|
struct LlamaCppEmbeddingResponseItem {
|
||||||
pub _index: usize,
|
pub index: usize,
|
||||||
pub embedding: Vec<Vec<f32>>, // This is the fucked up part - embedding is an array of arrays
|
pub embedding: Vec<Vec<f32>>, // This is the fucked up part - embedding is an array of arrays
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue