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
- Install the docker container that includes
ollama. This command will create a localollama-modelsfolder in which the models will be downloaded (~2.6GB).
docker compose up -d ollama
- Check that the container has been succesfully installed and is running locally by accessing to the following url. A
Ollama is runningmessage should appear in the web navigator:
http://localhost:11434/
- Install
Deepseekto be used in theOllamacontainer we've installed before, that will be downloaded (~5.2GB):
docker compose exec ollama ollama pull deepseek-r1:latest
- Request to the
http://localhost:11434/api/generateendpoint (using aPOSTmethod 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
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_docker_ollama-0.0.4.tar.gz.
File metadata
- Download URL: yta_docker_ollama-0.0.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b9a74eb51b0738ffa9228cc7e53ff9c3311f34becfd50c0fb345dfde824a62f
|
|
| MD5 |
686b10607433fba9481fd32a59f1fa64
|
|
| BLAKE2b-256 |
bf74800996b9e07ae80888cb0290596c2eecf3be691c8657a90f64c927026272
|
File details
Details for the file yta_docker_ollama-0.0.4-py3-none-any.whl.
File metadata
- Download URL: yta_docker_ollama-0.0.4-py3-none-any.whl
- Upload date:
- Size: 6.4 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 |
e3aa2b321b3a7122d687e5addf1333b01ff6136e7e58e4d4df3fca1d8ed0712a
|
|
| MD5 |
ad72ccb2308f77efdd0667171888ed9e
|
|
| BLAKE2b-256 |
64a57d597203e496204e32f2680d1589b5f50ea4a17b82aedbb0513379f0fcc3
|