Skip to main content

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:

  1. 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

  2. Creamos una carpeta models para tener los modelos ahí guardados (en mi caso en un SSD externo para ahorrar espacio) en D:/llama/models.

  3. 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 models del paso 2: $huggingface-cli download unsloth/gemma-4-E2B-it-GGUF gemma-4-E2B-it-UD-Q4_K_XL.gguf --local-dir ./

  4. 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

yta_fastapi_docker_llamacpp-0.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yta_fastapi_docker_llamacpp-0.0.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file yta_fastapi_docker_llamacpp-0.0.1.tar.gz.

File metadata

File hashes

Hashes for yta_fastapi_docker_llamacpp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9c9b81b7623a7940d8971fb1e15a0185a85af6bcc5cacaf03998b4a0f7257f75
MD5 9c3ff3c403de9cf3e06374a087bb0956
BLAKE2b-256 ebdaadfb9bd6ab57ca9e101e08e87d461479de6f8a5231c7a9ca50725a7695e2

See more details on using hashes here.

File details

Details for the file yta_fastapi_docker_llamacpp-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for yta_fastapi_docker_llamacpp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1a15b7b4f9787b146aae7033c18e9cb347b50b3a1ffd625668c7786aa1e443e
MD5 08d739f6e6508cd1ada82267db9b75ad
BLAKE2b-256 4e4b305d73544fe87d5fd9f5528176a509f4184e641ec48a8c2c915f26575035

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page