{"id":6671,"date":"2026-06-08T13:14:39","date_gmt":"2026-06-08T11:14:39","guid":{"rendered":"https:\/\/roccadomenico.it\/wordpress\/?p=6671"},"modified":"2026-06-08T13:18:14","modified_gmt":"2026-06-08T11:18:14","slug":"ollama-su-docker","status":"publish","type":"post","link":"https:\/\/roccadomenico.it\/wordpress\/ollama-su-docker\/","title":{"rendered":"Ollama su docker"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"6671\" class=\"elementor elementor-6671\">\n\t\t\t\t<div class=\"elementor-element elementor-element-849d47e e-flex e-con-boxed e-con e-parent\" data-id=\"849d47e\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d368a52 elementor-widget elementor-widget-text-editor\" data-id=\"d368a52\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h2 data-section-id=\"1eu89hc\" data-start=\"122\" data-end=\"140\">1. Prerequisiti<\/h2><p data-start=\"142\" data-end=\"188\">Verifica che i driver NVIDIA siano installati:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>nvidia-smi<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"214\" data-end=\"266\">Dovresti vedere la tua GPU e la versione del driver.<\/p><hr data-start=\"268\" data-end=\"271\" \/><h2 data-section-id=\"1wwl85p\" data-start=\"273\" data-end=\"294\">2. Installa Docker<\/h2><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code><span class=\"\u037c10\">sudo<\/span> apt update<br \/><span class=\"\u037c10\">sudo<\/span> apt install <span class=\"\u037c12\">-y<\/span> docker.io docker-compose-plugin<br \/><span class=\"\u037c10\">sudo<\/span> systemctl enable docker<br \/><span class=\"\u037c10\">sudo<\/span> systemctl <span class=\"\u037c10\">start<\/span> docker<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"434\" data-end=\"474\">Aggiungi il tuo utente al gruppo docker:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code><span class=\"\u037c10\">sudo<\/span> usermod <span class=\"\u037c12\">-aG<\/span> docker <span class=\"\u037c11\">$USER<\/span><\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"519\" data-end=\"543\">Poi esegui logout\/login.<\/p><hr data-start=\"545\" data-end=\"548\" \/><h2 data-section-id=\"ho5bjg\" data-start=\"550\" data-end=\"589\">3. Installa NVIDIA Container Toolkit<\/h2><p data-start=\"591\" data-end=\"614\">Aggiungi il repository:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code><span class=\"\u037c10\">curl<\/span> <span class=\"\u037c12\">-fsSL<\/span> https:\/\/nvidia.github.io\/libnvidia-container\/gpgkey | \\<br \/><span class=\"\u037c10\">sudo<\/span> gpg <span class=\"\u037c12\">--dearmor<\/span> <span class=\"\u037c12\">-o<\/span> \/usr\/share\/keyrings\/nvidia-container-toolkit-keyring.gpg<br \/><br \/><span class=\"\u037c10\">curl<\/span> <span class=\"\u037c12\">-s<\/span> <span class=\"\u037c12\">-L<\/span> https:\/\/nvidia.github.io\/libnvidia-container\/stable\/deb\/nvidia-container-toolkit.list | \\<br \/><span class=\"\u037c10\">sed<\/span> <span class=\"\u037cz\">'s#deb https:\/\/#deb [signed-by=\/usr\/share\/keyrings\/nvidia-container-toolkit-keyring.gpg] https:\/\/#g'<\/span> | \\<br \/><span class=\"\u037c10\">sudo<\/span> <span class=\"\u037c10\">tee<\/span> \/etc\/apt\/sources.list.d\/nvidia-container-toolkit.list<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1049\" data-end=\"1058\">Installa:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code><span class=\"\u037c10\">sudo<\/span> apt update<br \/><span class=\"\u037c10\">sudo<\/span> apt install <span class=\"\u037c12\">-y<\/span> nvidia-container-toolkit<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1134\" data-end=\"1151\">Configura Docker:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code><span class=\"\u037c10\">sudo<\/span> nvidia-ctk runtime configure <span class=\"\u037c12\">--runtime<\/span><span class=\"\u037cv\">=<\/span>docker<br \/><span class=\"\u037c10\">sudo<\/span> systemctl <span class=\"\u037c10\">restart<\/span> docker<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1247\" data-end=\"1252\">Test:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>docker run <span class=\"\u037c12\">--rm<\/span> <span class=\"\u037c12\">--gpus<\/span> all ubuntu nvidia-smi<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1312\" data-end=\"1345\">Se visualizzi la GPU, sei pronto.<\/p><hr data-start=\"1347\" data-end=\"1350\" \/><h2 data-section-id=\"1lg5yzs\" data-start=\"1352\" data-end=\"1384\">4. Crea la cartella di Ollama<\/h2><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code><span class=\"\u037c10\">mkdir<\/span> <span class=\"\u037c12\">-p<\/span> ~\/ollama<br \/><span class=\"\u037c10\">cd<\/span> ~\/ollama<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><hr data-start=\"1429\" data-end=\"1432\" \/><h2 data-section-id=\"d9hq27\" data-start=\"1434\" data-end=\"1471\">5. Crea il file docker-compose.yml<\/h2><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>services:<br \/>  ollama:<br \/>    image: ollama\/ollama:latest<br \/>    container_name: ollama<br \/><br \/>    ports:<br \/>      - <span class=\"\u037cz\">\"11434:11434\"<\/span><br \/><br \/>    volumes:<br \/>      - ollama_data:\/root\/.ollama<br \/><br \/>    restart: unless-stopped<br \/><br \/>    deploy:<br \/>      resources:<br \/>        reservations:<br \/>          devices:<br \/>            - driver: nvidia<br \/>              count: all<br \/>              capabilities: [gpu]<br \/><br \/>volumes:<br \/>  ollama_data:<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><hr data-start=\"1860\" data-end=\"1863\" \/><h2 data-section-id=\"1ajcshi\" data-start=\"1865\" data-end=\"1883\">6. Avvia Ollama<\/h2><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>docker compose up <span class=\"\u037c12\">-d<\/span><\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1919\" data-end=\"1928\">Verifica:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>docker <span class=\"\u037c10\">ps<\/span><\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><hr data-start=\"1953\" data-end=\"1956\" \/><h2 data-section-id=\"1opnvtv\" data-start=\"1958\" data-end=\"1982\">7. Scarica un modello<\/h2><p data-start=\"1984\" data-end=\"2007\">Ad esempio Qwen 2.5 7B:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>docker exec <span class=\"\u037c12\">-it<\/span> ollama ollama pull qwen2.5:7b<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2068\" data-end=\"2075\">Oppure:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>docker exec <span class=\"\u037c12\">-it<\/span> ollama ollama pull qwen3:8b<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><hr data-start=\"2134\" data-end=\"2137\" \/><h2 data-section-id=\"jmmn3s\" data-start=\"2139\" data-end=\"2168\">8. Verifica che usi la GPU<\/h2><p data-start=\"2170\" data-end=\"2177\">Lancia:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>docker exec <span class=\"\u037c12\">-it<\/span> ollama ollama run qwen2.5:7b<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2237\" data-end=\"2259\">In un altro terminale:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>watch <span class=\"\u037c12\">-n<\/span> <span class=\"\u037cy\">1<\/span> nvidia-smi<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2296\" data-end=\"2354\">Dovresti vedere memoria GPU occupata e utilizzo della GPU<\/p><hr \/><p data-start=\"2296\" data-end=\"2354\">comandi Ollama sotto docker<\/p><p data-start=\"0\" data-end=\"115\">Se Ollama \u00e8 in esecuzione dentro un container Docker chiamato <code data-start=\"62\" data-end=\"70\">ollama<\/code>, puoi vedere tutti i modelli installati con:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>docker exec <span class=\"\u037c12\">-it<\/span> ollama ollama list<br \/><br \/><\/code><\/pre><p data-start=\"654\" data-end=\"678\"><strong data-start=\"654\" data-end=\"678\">Rimuovere un modello<\/strong><\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>docker exec <span class=\"\u037c12\">-it<\/span> ollama ollama <span class=\"\u037c10\">rm<\/span> qwen2.5:7b<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\"><strong data-start=\"737\" data-end=\"774\">Entrare nella shell del container<\/strong><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>docker exec <span class=\"\u037c12\">-it<\/span> ollama <span class=\"\u037c10\">bash<\/span><\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">e poi eseguire direttamente:<\/div><\/div><\/div><\/div><\/div><\/div><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>ollama list<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">Se vuoi verificare anche quanto spazio occupano i modelli nel volume Docker:<\/div><\/div><\/div><\/div><\/div><\/div><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>docker system df <span class=\"\u037c12\">-v<\/span><\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">oppure:<\/div><\/div><\/div><\/div><\/div><\/div><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse\/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>docker exec <span class=\"\u037c12\">-it<\/span> ollama du <span class=\"\u037c12\">-sh<\/span> \/root\/.ollama\/models<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><pre class=\"cm-content q9tKkq_readonly m-0\"><code><\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>1. Prerequisiti Verifica che i driver NVIDIA siano installati: nvidia-smi Dovresti vedere la tua GPU e la versione del driver. 2. Installa Docker sudo apt updatesudo apt install -y docker.io docker-compose-pluginsudo systemctl enable dockersudo systemctl start docker Aggiungi il tuo utente al gruppo docker: sudo usermod -aG docker $USER Poi esegui logout\/login. 3. Installa NVIDIA [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[107,30],"tags":[],"class_list":["post-6671","post","type-post","status-publish","format-standard","hentry","category-a-i","category-informatica"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/posts\/6671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/comments?post=6671"}],"version-history":[{"count":4,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/posts\/6671\/revisions"}],"predecessor-version":[{"id":6675,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/posts\/6671\/revisions\/6675"}],"wp:attachment":[{"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/media?parent=6671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/categories?post=6671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/tags?post=6671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}