{ "cells": [ { "cell_type": "markdown", "source": [ "##***Project `Ollama-OpenWebUI-colab`***\n", "### Menjalankan large language model dengan ollama dan open-webui sebagai web server di google colab. Gratis tanpa spek PC gemink cukup pake hape saja.\n", "###### Author: Yudhistira Ardhi\n", "###### Last time updated: Feb 4, 2025" ], "metadata": { "id": "Ubw_-UYhKUcB" } }, { "cell_type": "markdown", "source": [ "### Cara Penggunaan\n", "## Atur Runtime di Google Colab\n", "- Klik menu Runtime di Google Colab.\n", "- Pilih Change runtime type dan pastikan opsi T4 GPU dipilih." ], "metadata": { "id": "RXTgiBTuMZ59" } }, { "cell_type": "code", "source": [ "#@title 1. Jalankan dibawah ini: Cek Driver Nvidia\n", "#@markdown tinggal di klik ikon segitiga\n", "!nvidia-smi" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "MC-TH8SNwrbQ", "outputId": "10eb82b2-2ce2-428b-d3c7-117c30a4e164", "collapsed": true, "cellView": "form" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Tue Feb 4 02:52:49 2025 \n", "+-----------------------------------------------------------------------------------------+\n", "| NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4 |\n", "|-----------------------------------------+------------------------+----------------------+\n", "| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |\n", "| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |\n", "| | | MIG M. |\n", "|=========================================+========================+======================|\n", "| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n", "| N/A 45C P8 9W / 70W | 0MiB / 15360MiB | 0% Default |\n", "| | | N/A |\n", "+-----------------------------------------+------------------------+----------------------+\n", " \n", "+-----------------------------------------------------------------------------------------+\n", "| Processes: |\n", "| GPU GI CI PID Type Process name GPU Memory |\n", "| ID ID Usage |\n", "|=========================================================================================|\n", "| No running processes found |\n", "+-----------------------------------------------------------------------------------------+\n" ] } ] }, { "cell_type": "code", "source": [ "#@title 2. Jalankan dibawah ini:\n", "#@markdown ## Download dan install program yang diperlukan\n", "#@markdown tinggal di klik icon segitiga. agak lama sih installnya.\n", "!git clone https://huggingface.co/gendisjawi/ollama-openwebui-colab\n", "!chmod +x ollama-openwebui-colab/install_program.sh ollama-openwebui-colab/download_model.sh ollama-openwebui-colab/start.sh\n", "!./ollama-openwebui-colab/install_program.sh" ], "metadata": { "cellView": "form", "id": "0xSHZwa8PDiv" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "#@title 3. Jalankan dibawah ini:\n", "#@markdown ## Download model dari repository ollama\n", "#@markdown kalian bisa melihat list model yang ingin digunakan di web ollama yaitu di: https://ollama.com/search
\n", "#@markdown cukup masukkan nama model disini, default = \"deepseek-r1:1.5b\" dengan ukuran 1.1gb\n", "model_name = \"deepseek-r1:1.5b\" #@param {type: \"string\"}\n", "!./ollama-openwebui-colab/download_model.sh --model {model_name}\n" ], "metadata": { "id": "bVvWniFqIS67", "cellView": "form" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "#@title 4. Jalankan dibawah ini\n", "#@markdown ## Jalankan program\n", "#@markdown tolong tunggu hingga link/url muncul, jangan di klik dulu soalnya masih loading lamaa sebenernya hehe.
jika sudah muncul maka daftarkan akun di situs tersebut baru bisa digunakan\n", "!./ollama-openwebui-colab/start.sh" ], "metadata": { "cellView": "form", "id": "D_bbexsqRy-C" }, "execution_count": null, "outputs": [] } ], "metadata": { "colab": { "provenance": [], "gpuType": "T4" }, "kernelspec": { "display_name": "Python 3", "name": "python3" }, "accelerator": "GPU" }, "nbformat": 4, "nbformat_minor": 0 }