Skip to main content

Youtube Autonomous Docker Ollama Module

Project description

Youtube Autonomous Docker Ollama Module

A module based on docker to use Ollama and make AI models available through local endpoints.


Proyect created based on this post: https://dev.to/savvasstephnds/run-deepseek-locally-using-docker-2pdm. I've modified it a bit by installing a different model, as I used the deepseek-r1:latest instead of the deepseek-r1:7b (you can check the list here: https://www.ollama.com/library/deepseek-r1).


Instructions

  1. Install the docker container that includes ollama. This command will create a local ollama-models folder in which the models will be downloaded (~2.6GB).
docker compose up -d ollama
  1. Check that the container has been succesfully installed and is running locally by accessing to the following url. A Ollama is running message should appear in the web navigator:
http://localhost:11434/
  1. Install Deepseek to be used in the Ollama container we've installed before, that will be downloaded (~5.2GB):
docker compose exec ollama ollama pull deepseek-r1:latest
  1. Request to the http://localhost:11434/api/generate endpoint (using a POST method and providing the model and the parameters needed to obtain a response).
payload = {
    'model': model.value,
    'prompt': prompt,
    'stream': False
}

response = requests.post(
    url = OLLAMA_GENERATE_URL,
    json = payload
)

Other models

*To install any other model, look for it in the list mentioned on top of this readme file and install it with the same command as before. If you want to install the llama3.2-vision:latest, just execute this command below:

docker compose exec ollama ollama pull llama3.2-vision:latest

Final command

Execute this commands once you've cloned the project to set up the docker container and the models:

docker compose up -d ollama
docker compose exec ollama ollama pull deepseek-r1:latest
docker compose exec ollama ollama pull gemma3:latest

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_docker_ollama-0.0.5.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

yta_docker_ollama-0.0.5-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file yta_docker_ollama-0.0.5.tar.gz.

File metadata

  • Download URL: yta_docker_ollama-0.0.5.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.9.0 Windows/10

File hashes

Hashes for yta_docker_ollama-0.0.5.tar.gz
Algorithm Hash digest
SHA256 60272b66d1b40d01d7df22aae45401c3c6cd36f4e1360e87ebe21c5abe65a171
MD5 52eac4359545fa4316b8eaa5804ef460
BLAKE2b-256 de46acb4df540091e9013438bd5385a9263663312f6b559d189c65b55bbf64c3

See more details on using hashes here.

File details

Details for the file yta_docker_ollama-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: yta_docker_ollama-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.9.0 Windows/10

File hashes

Hashes for yta_docker_ollama-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 adcaa502a6f26a4bc079a6eb2272791e18e442a5d6c4096d936a55d4f2177a1a
MD5 26ab0b28c9b4f7eb9dc2d4e4c28bc1c4
BLAKE2b-256 4f891283068a689c76eaa7c9cd535181d77566d914b23247dd95c9e9eadcab7a

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