This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Replace /etc/docker/daemon.json docker config in Brev.dev Crusoe GPUs | |
| { | |
| "default-runtime": "nvidia", | |
| "mtu": 1500, | |
| "runtimes": { | |
| "nvidia": { | |
| "args": [], | |
| "path": "nvidia-container-runtime" | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This is local cli command that allows users to use kokoro on a Macbook Pro | |
| # Requires you to first run the kokoro docker container: | |
| docker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:latest | |
| # Then save this file to /usr/local/bin | |
| # Finally you can test: | |
| kokoro "The quick brown fox jumped over the lazy dog" | |
| # Or even pipe from a stream like: | |
| llm "tell me a joke" | kokoro |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Setup: | |
| # conda create -n wan python=3.10 | |
| # conda activate wan | |
| # pip3 install torch torchvision torchaudio | |
| # pip install git+https://github.com/huggingface/diffusers.git@3ee899fa0c0a443db371848a87582b2e2295852d | |
| # pip install accelerate==1.4.0 | |
| # pip install transformers==4.49.0 | |
| # pip install ftfy==6.3.1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| pihole-unbound: | |
| image: 'bigbeartechworld/big-bear-pihole-unbound:2024.07.0' | |
| environment: | |
| - SERVICE_FQDN_PIHOLE_8080 | |
| - SERVICE_FQDN_PIHOLE_10443 | |
| - 'DNS1=127.0.0.1#5353' | |
| - DNS2=no | |
| - TZ=America/Chicago | |
| - WEBPASSWORD=$SERVICE_PASSWORD_PIHOLE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from optimum.quanto import freeze, qfloat8, quantize | |
| from diffusers import FluxPipeline | |
| import torch | |
| import time | |
| seed=1337 | |
| generator = torch.Generator("cuda").manual_seed(seed) | |
| pipeline = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16).to("cuda") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # conda create -n flux python=3.11 | |
| # conda activate flux | |
| # pip install torch==2.3.1 | |
| # pip install diffusers==0.30.0 transformers==4.43.3 | |
| # pip install sentencepiece==0.2.0 accelerate==0.33.0 protobuf==5.27.3 | |
| import torch | |
| from diffusers import FluxPipeline | |
| import diffusers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| import random | |
| random.seed(42) | |
| torch.manual_seed(42) | |
| from transformers import LlamaTokenizer, LlamaForCausalLM | |
| model_path = 'openlm-research/open_llama_3b_v2' | |
| tokenizer = LlamaTokenizer.from_pretrained(model_path, legacy=True); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| build: | |
| gpu: true | |
| python_version: "3.10" | |
| run: | |
| - apt update -y && apt install -y software-properties-common python3-launchpadlib && apt update -y && add-apt-repository -y ppa:git-core/ppa && apt update -y | |
| - apt install -y gcc g++ aria2 git git-lfs wget libgl1 libglib2.0-0 ffmpeg cmake libgtk2.0-0 libopenmpi-dev unzip libssl-dev pkg-config tmux ca-certificates | |
| - wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run && sh cuda_12.1.0_530.30.02_linux.run --silent --toolkit | |
| - git clone https://github.com/aristocratos/btop /content/btop && cd /content/btop && make && make install PREFIX=/usr && rm -rf /content/btop | |
| - pip install notebook pyngrok pickleshare ipywidgets | |
| - pip install https://github.com/camenduru/wheels/releases/download/replicate/vllm-0.4.0.post1-cp310-cp310-linux_x86_64.whl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import cv2 | |
| import argparse | |
| import numpy as np | |
| MONITOR_W = 38.5 | |
| def write_depth(depth, bits=1, reverse=True): | |
| depth_min = depth.min() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ To use: install Ollama, clone OpenVoice, run this script in the OpenVoice directory | |
| brew install portaudio | |
| brew install git-lfs | |
| git lfs install | |
| git clone https://github.com/myshell-ai/OpenVoice | |
| cd OpenVoice | |
| git clone https://huggingface.co/myshell-ai/OpenVoice | |
| cp -r OpenVoice/* . | |
NewerOlder