@CoinSh0t: 这位律师靠卖便携式离线AI赚了15万美元。它能分析法律上无法在网络上展示的文档。这…

X AI KOLs Timeline 工具

摘要

一位律师使用Raspberry Pi 5、Ollama和Phi-3-mini构建了一台成本50美元的便携式离线AI设备,以999美元的价格出售给需要安全文档分析的律师事务所。本指南将逐步说明如何复现该设置。

这位律师通过销售便携式离线AI赚了15万美元。 它可以分析法律上无法在网络上展示的文档。 整个设备成本50美元,他售价999美元。 以下是逐步制作方法: 你需要4样东西: → Raspberry Pi 5 (8GB) → PiSugar 3 Plus 电池 → Whisplay HAT (用于屏幕和麦克风) → 64GB SD卡。 在阿里巴巴上总成本大约在50到90美元之间,如果你等到合适的优惠。 1. 使用Raspberry Pi Imager将Raspberry Pi OS Lite 64位系统写入SD卡。 2. 将PiSugar电池放在Pi下面,扣上Whisplay HAT,插入SD卡,启动设备。 3. 打开终端,用一条命令安装Ollama: curl -fsSL https://ollama.com/install.sh | sh 4. 拉取一个能在Pi上流畅运行的模型: ollama pull phi3:mini 5. 运行模型并开始离线聊天: ollama run phi3:mini 整个设备可以放入口袋,电池续航4小时,一旦设置完成就永不联网。 这位律师将自己的版本装入定制外壳,预装法律文档分析提示词,然后出售给法律上不能在云端处理客户数据的律师事务所。 你可以将你的产品卖给医生、会计师、政府承包商、国防公司或任何处理法律上不能离开本地的数据的人。 硬件成本: 50到90美元。 售价: 500到1999美元。
查看原文
查看缓存全文

缓存时间: 2026/05/27 03:18

这位律师通过销售便携式离线AI赚了15万美元。

它能分析法律上不允许出现在网络上的文档。

整套设备成本50美元,他以999美元的价格出售。

以下是分步制作方法:

你需要4样东西:

→ Raspberry Pi 5(8GB)

→ PiSugar 3 Plus 电池

→ 用于屏幕和麦克风的 Whisplay HAT

→ 64GB SD卡

在AliExpress上,如果等到合适的价格,总成本约在50到90美元之间。

  1. 使用Raspberry Pi Imager将Raspberry Pi OS Lite 64位版写入SD卡。

  2. 将PiSugar电池叠在树莓派下方,把Whisplay HAT扣在上面,插入SD卡,然后启动设备。

  3. 打开终端,用一行命令安装Ollama:
    curl -fsSL https://ollama.com/install.sh | sh

  4. 拉取一个能在树莓派上流畅运行的模型:
    ollama pull phi3:mini

  5. 运行模型,开始离线聊天:
    ollama run phi3:mini

整个设备能装进口袋,续航4小时,设置完成后永不联网。

这位律师将自己的版本装进定制外壳,预置了法律文档分析提示,卖给那些在法律上不能在云端处理客户数据的律所。

你可以把产品卖给医生、会计师、政府承包商、军工企业,或者其他任何处理法律上不能离开本地的数据的人。

硬件成本:50~90美元。

售价:500~1999美元。


来源:https://release-assets.githubusercontent.com/github-production-release-asset/658928958/b696725b-a213-40f6-a003-1b99674bed73?sp=r&sv=2018-11-09&sr=b&spr=https&se=2026-05-27T03%3A57%3A05Z&rscd=attachment%3B+filename%3Dinstall.sh&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2026-05-27T02%3A56%3A26Z&ske=2026-05-27T03%3A57%3A05Z&sks=b&skv=2018-11-09&sig=3dxnE8IrJ70Fn0zBhunimcwkQEBIvoqUrKtnXF85nbU%3D&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc3OTg1MjE4NywibmJmIjoxNzc5ODUxODg3LCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.R0yqz-Q9igPnWKiPVAW5iNEmSVwjgg36K6wIUsy7ElQ&response-content-disposition=attachment%3B%20filename%3Dinstall.sh&response-content-type=application%2Foctet-stream #!/bin/sh # 此脚本在Linux和macOS上安装Ollama。 # 它检测当前操作系统架构,并安装相应版本的Ollama。 # 将脚本包装在main函数中,以防止部分下载的内容在未完成时执行半个脚本。 main() { set -eu red=“((/usr/bin/tput bold || :; /usr/bin/tput setaf 1 || :) 2>&-)” plain=“((/usr/bin/tput sgr0 || :) 2>&-)” status() { echo “>>> \*" \>&2; \} error\(\) \{ echo "{red}ERROR:${plain} \*"; exit 1; \} warning\(\) \{ echo "{red}WARNING:${plain} \*"; \} TEMP_DIR=(mktemp -d) cleanup() { rm -rf $TEMP_DIR; } trap cleanup EXIT available() { command -v $1 >/dev/null; } require() { local MISSING=‘’ for TOOL in $*; do if ! available TOOL; then MISSING="MISSING $TOOL” fi done echo MISSING \} OS="(uname -s)“ ARCH=\(uname -m\) case "ARCH“ in x86_64) ARCH=“amd64” ;; aarch64|arm64) ARCH=“arm64” ;; *) error “不支持的架构:ARCH" ;; esac VER_PARAM="{OLLAMA_VERSION:+?version=OLLAMA_VERSION\}" \#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# \# macOS \#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# if \[ "OS” = “Darwin” ]; then NEEDS=\(require curl unzip\) if \[ -n "NEEDS“ ]; then status “错误:缺少以下必需工具:” for NEED in $NEEDS; do echo “ - NEED" done exit 1 fi DOWNLOAD_URL="https://ollama\.com/download/Ollama-darwin\.zip{VER_PARAM}“ if pgrep -x Ollama >/dev/null 2>&1; then status “正在停止运行中的Ollama实例…” pkill -x Ollama 2>/dev/null || true sleep 2 fi if [ -d “/Applications/Ollama.app” ]; then status “正在移除现有的Ollama安装…” rm -rf “/Applications/Ollama.app” fi status “正在为macOS下载Ollama…” curl –fail –show-error –location –progress-bar \ -o “TEMP_DIR/Ollama-darwin\.zip" "DOWNLOAD_URL” status “正在安装到/Applications…” unzip -q “TEMP_DIR/Ollama-darwin\.zip" -d "TEMP_DIR” mv “TEMP_DIR/Ollama\.app" "/Applications/" if \[ \! -L "/usr/local/bin/ollama" \] \|\| \[ "(readlink “/usr/local/bin/ollama”)“ != “/Applications/Ollama.app/Contents/Resources/ollama” ]; then status “正在将’ollama’命令添加到PATH(可能需要密码)…” mkdir -p “/usr/local/bin” 2>/dev/null || sudo mkdir -p “/usr/local/bin” ln -sf “/Applications/Ollama.app/Contents/Resources/ollama” “/usr/local/bin/ollama” 2>/dev/null || \ sudo ln -sf “/Applications/Ollama.app/Contents/Resources/ollama” “/usr/local/bin/ollama” fi if [ -z “\{OLLAMA_NO_START:\-\}" \]; then status "正在启动Ollama..." open -a Ollama --args hidden fi status "安装完成。现在可以运行'ollama'。" exit 0 fi \#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# \# Linux \#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# \[ "OS” = “Linux” ] || error ‘此脚本仅支持Linux和macOS。’ IS_WSL2=false KERN=\(uname -r\) case "KERN“ in *icrosoft*WSL2 | *icrosoft*wsl2) IS_WSL2=true;; *icrosoft) error “不支持Microsoft WSL1,请使用WSL2并通过’wsl –set-version2’切换”;; *) ;; esac SUDO= if [ “\(id -u\)" -ne 0 \]; then if \! available sudo; then error "此脚本需要超级用户权限,请以root用户重新运行。" fi SUDO="sudo" fi NEEDS=(require curl awk grep sed tee xargs) if [ -n “$NEEDS” ]; then status “错误:缺少以下必需工具:” for NEED in $NEEDS; do echo “ - NEED" done exit 1 fi \# 下载并解压函数,支持zst降级为tgz download_and_extract\(\) \{ local url_base="1“ local dest_dir=“2" local filename="3” # 检查.tar.zst是否可用 if curl –fail –silent –head –location “\{url_base\}/{filename}.tar.zst\{VER_PARAM\}" \>/dev/null 2\>&1; then \# zst文件存在 – 检查zstd工具 if \! available zstd; then error "此版本需要zstd解压。请安装zstd后重试:\n - Debian/Ubuntu: sudo apt-get install zstd\n - RHEL/CentOS/Fedora: sudo dnf install zstd\n - Arch: sudo pacman -S zstd" fi status "正在下载{filename}.tar.zst” curl –fail –show-error –location –progress-bar \ “\{url_base\}/{filename}.tar.zst${VER_PARAM}” | \ zstd -d | SUDO tar -xf - -C "{dest_dir}“ return 0 fi # 回退到.tgz(旧版本) status “正在下载\{filename\}\.tgz" curl --fail --show-error --location --progress-bar \\ "{url_base}/\{filename\}\.tgz{VER_PARAM}” | \ SUDO tar -xzf - -C "{dest_dir}“ } for BINDIR in /usr/local/bin /usr/bin /bin; do echo $PATH | grep -q BINDIR && break \|\| continue done OLLAMA_INSTALL_DIR=(dirname \{BINDIR\}\) if \[ -d "OLLAMA_INSTALL_DIR/lib/ollama“ ] ; then status “正在清理旧版本 $OLLAMA_INSTALL_DIR/lib/ollama” SUDO rm -rf "OLLAMA_INSTALL_DIR/lib/ollama“ fi status “正在将ollama安装到 $OLLAMA_INSTALL_DIR” $SUDO install -o0 -g0 -m755 -d $BINDIR SUDO install -o0 -g0 -m755 -d "OLLAMA_INSTALL_DIR/lib/ollama“ download_and_extract “https://ollama.com/download” “OLLAMA_INSTALL_DIR" "ollama-linux-{ARCH}” if [ “OLLAMA_INSTALL_DIR/bin/ollama" \!= "BINDIR/ollama” ] ; then status “在$BINDIR中创建ollama符号链接以便PATH访问” SUDO ln -sf "OLLAMA_INSTALL_DIR/ollama“ “BINDIR/ollama" fi \# 检查NVIDIA JetPack系统(额外下载) if \[ -f /etc/nv_tegra_release \] ; then if grep R36 /etc/nv_tegra_release \> /dev/null ; then download_and_extract "https://ollama\.com/download" "OLLAMA_INSTALL_DIR” “ollama-linux-\{ARCH\}-jetpack6" elif grep R35 /etc/nv_tegra_release \> /dev/null ; then download_and_extract "https://ollama\.com/download" "OLLAMA_INSTALL_DIR” “ollama-linux-${ARCH}-jetpack5” else warning “检测到不支持的JetPack版本,GPU可能无法正常工作” fi fi install_success() { status ‘Ollama API现在可用,地址为127.0.0.1:11434。’ status ‘安装完成。请在命令行中运行“ollama“。’ } trap install_success EXIT # 从这里开始所有步骤都是可选的 configure_systemd() { if ! id ollama >/dev/null 2>&1; then status “正在创建ollama用户…” $SUDO useradd -r -s /bin/false -U -m -d /usr/share/ollama ollama fi if getent group render >/dev/null 2>&1; then status “正在将ollama用户添加到render组…” $SUDO usermod -a -G render ollama fi if getent group video >/dev/null 2>&1; then status “正在将ollama用户添加到video组…” $SUDO usermod -a -G video ollama fi status “正在将当前用户添加到ollama组…” $SUDO usermod -a -G ollama $(whoami) status “正在创建ollama systemd服务…” cat </dev/null [Unit] Description=Ollama Service After=network-online.target

[Service] ExecStart=BINDIR/ollama serve User=ollama Group=ollama Restart=always RestartSec=3 Environment="PATH=PATH“

[Install] WantedBy=default.target EOF SYSTEMCTL_RUNNING=“$(systemctl is-system-running || true)” case $SYSTEMCTL_RUNNING in running|degraded) status “正在启用并启动ollama服务…” $SUDO systemctl daemon-reload $SUDO systemctl enable ollama start_service() { SUDO systemctl restart ollama; \} trap start_service EXIT ;; \*\) warning "systemd未运行" if \[ "IS_WSL2“ = true ]; then warning “参见https://learn.microsoft.com/en-us/windows/wsl/systemd#how-to-enable-systemd了解如何启用” fi ;; esac } if available systemctl; then configure_systemd fi # WSL2仅通过nvidia passthrough支持GPU if [ “IS_WSL2" = true \]; then if available nvidia-smi && \[ -n "(nvidia-smi | grep -o “CUDA Version: [0-9]*\.[0-9]*”)“ ]; then status “检测到NVIDIA GPU。” fi install_success exit 0 fi # 不要在Jetson系统上尝试安装驱动 if [ -f /etc/nv_tegra_release ] ; then status “NVIDIA JetPack已就绪。” install_success exit 0 fi # 在Linux上安装GPU依赖 if ! available lspci && ! available lshw; then warning “无法检测NVIDIA/AMD GPU。请安装lspci或lshw以自动检测并安装GPU依赖。” exit 0 fi check_gpu() { case $1 in lspci) case $2 in nvidia) available lspci && lspci -d ‘10de:’ | grep -q ‘NVIDIA’ || return 1 ;; amdgpu) available lspci && lspci -d ‘1002:’ | grep -q ‘AMD’ || return 1 ;; esac ;; lshw) case $2 in nvidia) available lshw && $SUDO lshw -c display -numeric -disable network | grep -q ‘vendor: .* \[10DE\]’ || return 1 ;; amdgpu) available lshw && SUDO lshw -c display -numeric -disable network \| grep -q 'vendor: .\* \\\[1002\\\]' \|\| return 1 ;; esac ;; nvidia-smi\) available nvidia-smi \|\| return 1 ;; esac \} if check_gpu nvidia-smi; then status "已安装NVIDIA GPU。" exit 0 fi if \! check_gpu lspci nvidia && \! check_gpu lshw nvidia && \! check_gpu lspci amdgpu && \! check_gpu lshw amdgpu; then install_success warning "未检测到NVIDIA/AMD GPU,Ollama将以纯CPU模式运行。" exit 0 fi if check_gpu lspci amdgpu \|\| check_gpu lshw amdgpu; then download_and_extract "https://ollama\.com/download" "OLLAMA_INSTALL_DIR“ “ollama-linux-${ARCH}-rocm” install_success status “AMD GPU已就绪。” exit 0 fi CUDA_REPO_ERR_MSG=“检测到NVIDIA GPU,但您的操作系统和架构不受NVIDIA支持。请手动安装CUDA驱动:https://docs.nvidia.com/cuda/cuda-installation-guide-linux/” # ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#rhel-7-centos-7 # ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#rhel-8-rocky-8 # ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#rhel-9-rocky-9 # ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#fedora install_cuda_driver_yum() { status ‘正在安装NVIDIA软件源…’ case $PACKAGE_MANAGER in yum) $SUDO PACKAGE_MANAGER -y install yum-utils if curl -I --silent --fail --location "https://developer\.download\.nvidia\.com/compute/cuda/repos/12/(uname -m | sed -e ‘s/aarch64/sbsa/’)/cuda-12.repo“ >/dev/null ; then $SUDO PACKAGE_MANAGER-config-manager --add-repo https://developer\.download\.nvidia\.com/compute/cuda/repos/12/(uname -m | sed -e ‘s/aarch64/sbsa/’)/cuda-12.repo else error CUDA_REPO_ERR_MSG fi ;; dnf\) if curl -I --silent --fail --location "https://developer\.download\.nvidia\.com/compute/cuda/repos/12/(uname -m | sed -e ‘s/aarch64/sbsa/’)/cuda-12.repo“ >/dev/null ; then $SUDO PACKAGE_MANAGER config-manager --add-repo https://developer\.download\.nvidia\.com/compute/cuda/repos/12/(uname -m | sed -e ‘s/aarch64/sbsa/’)/cuda-12.repo else error $CUDA_REPO_ERR_MSG fi ;; esac case $1 in rhel) status ‘正在安装EPEL软件源…’ $SUDO PACKAGE_MANAGER -y install https://dl\.fedoraproject\.org/pub/epel/epel-release-latest-2.noarch.rpm || true ;; esac status ‘正在安装CUDA驱动…’ if [ “1" = 'centos' \] \|\| \[ "1$2” = ‘rhel7’ ]; then $SUDO $PACKAGE_MANAGER -y install nvidia-driver-latest-dkms fi $SUDO PACKAGE_MANAGER -y install cuda-drivers \} \# ref: https://docs\.nvidia\.com/cuda/cuda-installation-guide-linux/index\.html\#ubuntu \# ref: https://docs\.nvidia\.com/cuda/cuda-installation-guide-linux/index\.html\#debian install_cuda_driver_apt\(\) \{ status '正在安装NVIDIA软件源...' if curl -I --silent --fail --location "https://developer\.download\.nvidia\.com/compute/cuda/repos/12/(uname -m | sed -e ‘s/aarch64/sbsa/’)/cuda-keyring_1.1-1_all.deb“ >/dev/null ; then curl -fsSL -o TEMP_DIR/cuda-keyring\.deb https://developer\.download\.nvidia\.com/compute/cuda/repos/12/(uname -m | sed -e ‘s/aarch64/sbsa/’)/cuda-keyring_1.1-1_all.deb else error $CUDA_REPO_ERR_MSG fi case $1 in debian) status ‘正在启用contrib源…’ $SUDO sed ‘s/main/contrib/’ < /etc/apt/sources.list | $SUDO tee /etc/apt/sources.list.d/contrib.list > /dev/null if [ -f “/etc/apt/sources.list.d/debian.sources” ]; then $SUDO sed ‘s/main/contrib/’ < /etc/apt/sources.list.d/debian.sources | $SUDO tee /etc/apt/sources.list.d/contrib.sources > /dev/null fi ;; esac status ‘正在安装CUDA驱动…’ $SUDO dpkg -i $TEMP_DIR/cuda-keyring.deb SUDO apt-get update \[ -n "SUDO“ ] && SUDO_E=“$SUDO -E” || SUDO_E= DEBIAN_FRONTEND=noninteractive SUDO_E apt-get -y install cuda-drivers -q \} if \[ \! -f "/etc/os-release" \]; then error "未知发行版,跳过CUDA安装。" fi \. /etc/os-release OS_NAME=ID OS_VERSION=$VERSION_ID PACKAGE_MANAGER= for PACKAGE_MANAGER in dnf yum apt-get; do if available PACKAGE_MANAGER; then break fi done if \[ -z "PACKAGE_MANAGER“ ]; then error “未知包管理器,跳过CUDA安装。” fi if ! check_gpu nvidia-smi || [ -z “$(nvidia-smi | grep -o “CUDA Version: [0-9]*\.[0-9]*”)“ ]; then case $OS_NAME in centos|rhel) install_cuda_driver_yum ‘rhel’ $(echo $OS_VERSION | cut -d ‘.’ -f 1) ;; rocky) install_cuda_driver_yum ‘rhel’ $(echo $OS_VERSION | cut -d ‘.’ -f 1) ;; amzn) install_cuda_driver_yum ‘rhel’ 7 ;; fedora) install_cuda_driver_yum ‘fedora’ $OS_VERSION ;; ubuntu) install_cuda_driver_apt ‘ubuntu’ $(echo $OS_VERSION | sed ‘s/\.//’) ;; debian) install_cuda_driver_apt ‘debian’ $OS_VERSION ;; *) error “未支持的Linux发行版。请手动安装CUDA驱动。”;; esac fi install_success }

相似文章