ajout de ollama
This commit is contained in:
8
sci-ml/ollama/files/ollama-0.31.1-cmake.patch
Normal file
8
sci-ml/ollama/files/ollama-0.31.1-cmake.patch
Normal 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)
|
||||
|
||||
10
sci-ml/ollama/files/ollama-0.31.1-gcc17.patch
Normal file
10
sci-ml/ollama/files/ollama-0.31.1-gcc17.patch
Normal 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>
|
||||
11
sci-ml/ollama/files/ollama-0.31.1-ggml.patch
Normal file
11
sci-ml/ollama/files/ollama-0.31.1-ggml.patch
Normal 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()
|
||||
11
sci-ml/ollama/files/ollama.confd
Normal file
11
sci-ml/ollama/files/ollama.confd
Normal 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"
|
||||
9
sci-ml/ollama/files/ollama.init
Normal file
9
sci-ml/ollama/files/ollama.init
Normal 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"
|
||||
15
sci-ml/ollama/files/ollama.service
Normal file
15
sci-ml/ollama/files/ollama.service
Normal 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
|
||||
Reference in New Issue
Block a user