Youtube Autonomous FastAPI Docker Llama.cpp Module
Project description
Youtube Autonomous FastAPI Docker Llama.cpp Module
The module that is providing the functionality related to the Llama.cpp models hub (having the models and using them) through a FastAPI that is included and isolated in a Docker container.
This module is meant to be exposed as a container inside the internal network, to be connected with its own FastAPI that is exposing the functionality outside.
Endpoints
GET
No endpoints by now.
POST
No endpoints by now.
Instructions
I've followed these steps to make llama.cpp available in my laptop as a container running with cuda, and I've adapted this workflow to this project so its done automatically:
-
Nos aseguramos de tener la imagen de Nvidia en docker:
$docker run --rm --gpus all nvidia/cuda:12.9.1-runtime-ubuntu24.04 nvidia-smi -
Creamos una carpeta
modelspara tener los modelos ahí guardados (en mi caso en un SSD externo para ahorrar espacio) enD:/llama/models. -
Descargamos el modelo GGUF que necesitemos (para ello, ver que tipo y qué características en función de nuestro PC), en cmd desde la carpeta
modelsdel paso 2:$huggingface-cli download unsloth/gemma-4-E2B-it-GGUF gemma-4-E2B-it-UD-Q4_K_XL.gguf --local-dir ./ -
Descargamos el contenedor 'llama.cpp' adaptado a CUDA, estando en el cmd de la carpeta
models:$docker run --rm --gpus all -p 8080:8080 -v "${PWD}:/models" ghcr.io/ggml-org/llama.cpp:server-cuda -m --host 0.0.0.0 -ngl 999
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yta_fastapi_docker_llamacpp-0.0.1.tar.gz.
File metadata
- Download URL: yta_fastapi_docker_llamacpp-0.0.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.0 CPython/3.9.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c9b81b7623a7940d8971fb1e15a0185a85af6bcc5cacaf03998b4a0f7257f75
|
|
| MD5 |
9c3ff3c403de9cf3e06374a087bb0956
|
|
| BLAKE2b-256 |
ebdaadfb9bd6ab57ca9e101e08e87d461479de6f8a5231c7a9ca50725a7695e2
|
File details
Details for the file yta_fastapi_docker_llamacpp-0.0.1-py3-none-any.whl.
File metadata
- Download URL: yta_fastapi_docker_llamacpp-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.0 CPython/3.9.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1a15b7b4f9787b146aae7033c18e9cb347b50b3a1ffd625668c7786aa1e443e
|
|
| MD5 |
08d739f6e6508cd1ada82267db9b75ad
|
|
| BLAKE2b-256 |
4e4b305d73544fe87d5fd9f5528176a509f4184e641ec48a8c2c915f26575035
|