ajout de ollama

This commit is contained in:
root
2026-07-24 09:04:24 +02:00
parent 14b24ed97a
commit 2edb72ed75
9 changed files with 239 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
--- a/x/mlxrunner/mlx/CMakeLists.txt 2026-07-04 13:53:35.494218027 +0200
+++ b/x/mlxrunner/mlx/CMakeLists.txt 2026-07-04 13:54:08.428885766 +0200
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
+cmake_minimum_required(VERSION 3.10)
project(mlx)

View File

@@ -0,0 +1,10 @@
--- a/common/common.h 2026-07-04 12:25:21.565559439 +0200
+++ b/common/common.h 2026-07-04 12:25:43.052343559 +0200
@@ -8,6 +8,7 @@
#include "ggml.h"
#include <set>
+#include <fstream>
#include <sstream>
#include <string>
#include <string_view>

View File

@@ -0,0 +1,11 @@
--- a/llama/server/CMakeLists.txt 2026-07-04 07:08:27.528453937 +0200
+++ b/llama/server/CMakeLists.txt 2026-07-04 07:09:07.889047823 +0200
@@ -508,7 +508,7 @@
# RUNTIME covers executables and Windows DLLs; LIBRARY covers .so on Linux
install(TARGETS llama-server llama-quantize
RUNTIME DESTINATION ${_base_dest} COMPONENT llama-server OPTIONAL)
- set(_llama_server_base_libs ggml-base ggml llama mtmd)
+ set(_llama_server_base_libs llama mtmd)
if(TARGET llama-common)
list(APPEND _llama_server_base_libs llama-common)
endif()

View File

@@ -0,0 +1,11 @@
# Ollama allows cross-origin requests from 127.0.0.1 and 0.0.0.0 by default.
# Additional origins can be configured with OLLAMA_ORIGINS.
# export OLLAMA_ORIGINS="<ip>"
# log to syslog
# output_logger="logger -t \"$RC_SVCNAME\" -p daemon.info"
# error_logger="logger -t \"$RC_SVCNAME\" -p daemon.err"
# log to file
output_log="/var/log/ollama/ollama.log"
error_log="/var/log/ollama/ollama.log"

View File

@@ -0,0 +1,9 @@
#!/sbin/openrc-run
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License, v2
supervisor=supervise-daemon
description="Ollama Service"
command="/usr/bin/ollama"
command_args="serve"
command_user="ollama:ollama"

View File

@@ -0,0 +1,15 @@
[Unit]
Description=Ollama Service
After=network-online.target
[Service]
ExecStart=/usr/bin/ollama serve
User=ollama
Group=ollama
# GPU access: render -> /dev/dri/renderD* + /dev/kfd (ROCm), video -> legacy/NVIDIA
SupplementaryGroups=render video
Restart=always
RestartSec=3
[Install]
WantedBy=default.target