Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

How to Set Up and Run Ollama on a GPU-Powered VM (vast.ai)

How to Set Up and Run Ollama on a GPU-Powered VM (vast.ai) In this tutorial, we'll walk you through the process of setting up and using Ollama for private model inference on a VM with GPU, either on your local machine or a rented VM from…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




How to Set Up and Run Ollama on a GPU-Powered VM (vast.ai)



In this tutorial, we'll walk you through the process of setting up and using Ollama for private model inference on a VM with GPU, either on your local machine or a rented VM from Vast.ai or Runpod.io. Ollama allows you to run models privately, ensuring data security and faster inference times thanks to the power of GPUs. By leveraging a GPU-powered VM, you can significantly improve the performance and efficiency of your model inference tasks.






Outline




  1. Set up a VM with GPU on Vast.ai


  2. Start Jupyter Terminal


  3. Install Ollama


  4. Run Ollama Serve


  5. Test Ollama with a model


  6. (Optional) using your own model








🐰 AI Rabbit: Tutorials, News, and Insights on More guides and AI developments at https://airabbit.blog/










Setting Up a VM with GPU on Vast.ai



1. Create a VM with GPU: - Visit Vast.ai to create your VM. - Choose a VM with at least 30 GB of storage to accommodate the models. This ensures you have enough space for installation and model storage. - Select a VM that costs less than $0.30 per hour to keep the setup cost-effective.





2. Start Jupyter Terminal: - Once your VM is up and running, start Jupyter and open a terminal within it.








Downloading and Running Ollama





  1. Start Jupyter Terminal: - Once your VM is up and running, start Jupyter and open a terminal within it. This is the easiest method to get started. - Alternatively, you can use SSH on your local VM, for example with VSCode, but you will need to create an SSH key to use it.







  1. Install Ollama: - Open the terminal in Jupyter and run the following command to install Ollama:




bash curl -fsSL https://ollama.com/install.sh | sh






2. Run Ollama Serve: - After installation, start the Ollama service by running:




bash ollama serve &






Ensure there are no GPU errors. If there are issues, the response will be slow when interacting with the model.



3. Test Ollama with a Model: - Test the setup by running a sample model like Mistral:




bash ollama run mistral






You can now start chatting with the model to ensure everything is working correctly.



Optional (Check GPU usage)



Check GPU Utilization: - During the inference (last step), check if the GPU is being utilized by running the following command:bash nvidia-smi - Ensure that the memory utilization is greater than 0%. This indicates that the GPU is being used for the inference process.








Using Your Own Hugging Face Model with Ollama



1. Install Hugging Face CLI: - If you want to use your own model from Hugging Face, first install the Hugging Face CLI. Here we will use an example of a fine tuned Mistral model TheBloke/em_german_mistral_v01-GGUF em_german_mistral_v01.Q4_K_M.gguf



2. Download Your Model: - Download your desired model from Hugging Face. For example, to download a fine-tuned Mistral model:




pip3 install huggingface-hub









# Try with my custom model for fine tuned Mistral
huggingface-cli download TheBloke/em_german_mistral_v01-GGUF em_german_mistral_v01.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False






3. Create a Model File: - Create a model config file Modelfile with the following content:




FROM em_german_mistral_v01.Q4_K_M.gguf


# set the temperature to 1 [higher is more creative, lower is more coherent]
PARAMETER temperature 0

# # set the system message
# SYSTEM """
# You are Mario from Super Mario Bros. Answer as Mario, the assistant, only.
# """






4. Instruct Ollama to Create the Model: - Create the custom model using Ollama with the command:




ollama create -f mymodel Modelfile






5. Run Your Custom Model: - Run your custom model using:




ollama run mymodel






By following these steps, you can effectively utilize Ollama for private model inference on a VM with GPU, ensuring secure and efficient operations for your machine learning projects.



Happy prompting!

1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Vulnerability Remediation & Verification
Syntax validiert (0 Fehler)
title: Detect Exploitation - How to Set Up and Run Ollama on a GPU-Powered VM (vast.ai)
id: bd660812-af6b-46ad-8b07-e2bebe874a02
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-27
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-27"
        description = "YARA Signature for "
    strings:
        $str = "How to Set Up and Run Ollama o" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("How to Set Up and Run Ollama on a GPU-Po")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*How to Set Up and Run Ollama on a GPU-Po*"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "How to Set Up and Run Ollama on a GPU-Po"
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc

2. Cyber Threat Intelligence & Forensik

🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
🛡️
Exploit PoC Security Sandbox & Payload Analyzer TEXT
Danger Index:25/100 SAFE_ANALYSIS_ONLY
✅ Keine offensichtlich destruktiven Befehle erkannt.
Standard-Analystenprüfung vor Ausführung empfohlen.
Erkannte Gefahrensignaturen (1):
HIGHPAYLOAD_DROPPER:Download-and-Execute Dropper-Muster (Piped Shell-Execution).
curl -fsSL https://ollama.com/install.sh
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Analyse für identifizierte Bedrohung auf Basis von Live-CTI (ENISA EUVD): CVSS 0.0 · EPSS 0.0% · CISA KEV: nein. Handlungsableitung aus den verlinkten Hersteller-Quellen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to Set Up and Run Ollama on a GPU-Powered VM (vast.ai)

Thematisch verwandte Begriffe: Ollama, GPUPowered, vastai · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-100620 | Capgo CLI (npm package @capgo/cli) through 7.98.2 is affected by an ove…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag