Skip to content

Instantly share code, notes, and snippets.

View antonioanerao's full-sized avatar

Antonio Anerão antonioanerao

View GitHub Profile
@antonioanerao
antonioanerao / calc.py
Created September 19, 2024 13:43
Calcular VRAM necessária para Model
def calcular_vram(num_parametros, quantization_bits, overhead_factor=1.2):
memoria_modelo = (num_parametros * quantization_bits) / (8 * 10**9)
memoria_total = memoria_modelo * overhead_factor
return memoria_total
def main():
try:
num_parametros = float(input("Número de parâmetros do modelo (em bilhões, ex: 8 para 8B): ")) * 10**9
quantization_bits = int(input("Tamanho da quantização (quantization size em bits, ex: 4, 6, 8): "))
@antonioanerao
antonioanerao / Dockerfile
Last active September 1, 2024 14:21
Stack para buildar imagem com CUDA e llama-cpp e subir stack com docker-compose
ARG CUDA_IMAGE="12.5.0-devel-ubuntu22.04"
FROM nvidia/cuda:${CUDA_IMAGE}
WORKDIR /app
ENV ACCEPT_EULA=Y
ENV DEBIAN_FRONTEND=noninteractive
ENV HOST=0.0.0.0
ENV CUDA_DOCKER_ARCH=all
ENV GGML_CUDA=1
@antonioanerao
antonioanerao / docker-compose.yml
Created June 8, 2024 11:25
Docker compose WordPress
services:
traefik:
image: "traefik"
container_name: "traefik"
restart: always
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
@antonioanerao
antonioanerao / docker-ip.sh
Created May 6, 2024 14:45
Lista os IPs dos containers docker
#!/bin/bash
docker ps --format "{{.Names}}" | while read container; do
ip=$(docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$container")
printf "%-40.40s\t%s\t%s\n" "$container" "$ip"
done
@antonioanerao
antonioanerao / docker-compose.yml
Created May 5, 2024 14:32
Traefik + Portainer for localhost development
services:
traefik:
image: "traefik"
container_name: "traefik"
restart: always
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
@antonioanerao
antonioanerao / docker-compose.yml
Last active April 2, 2024 19:42
Docker compose laravel
version: "3.3"
services:
laravel:
container_name: laravel
image: antonioanerao/laravel:latest
restart: always
networks:
- proxy
ports:
@antonioanerao
antonioanerao / feature.yml
Created October 3, 2023 15:08
GitHub Issue Template for Feature/Enhancement
description: Novo recurso ou melhoria de um existente
title: "[Aprimoramento]: "
labels: ["enhancement"]
body:
- type: textarea
id: aprimoramento
attributes:
label: Aprimoramento
description: Descreva detalhadamente qual o novo recurso ou aprimoramento desejado.
validations:
@antonioanerao
antonioanerao / bug.yml
Created October 3, 2023 15:07
GitHub Issue Template for Bug
name: Reportar Bug
description: Reportar um erro de comportamento ou bug do código
title: "[Bug]: "
labels: ["bug"]
body:
- type: textarea
id: o-que-houve
attributes:
label: O que houve?
description: Descreva detalhadamente qual foi o problema encontrado
@antonioanerao
antonioanerao / docker-compose.yml
Created September 19, 2023 17:41
Docker compose com traefik e laravel
version: "3.3"
services:
traefik:
image: "traefik"
container_name: "traefik"
restart: always
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
@antonioanerao
antonioanerao / docker-compose.yml
Last active September 4, 2023 14:02
Exemplo de docker compose
version: "3.3"
services:
sigep-auth:
container_name: sigep-auth
image: antonioanerao/laravel:latest
restart: always
networks:
- proxy
ports: