build 0.0.2
This commit is contained in:
parent
9042b08ae3
commit
093c5dabbb
4 changed files with 29 additions and 10 deletions
|
|
@ -5,4 +5,5 @@ data/
|
||||||
.mypy_cache/
|
.mypy_cache/
|
||||||
.ruff_cache/
|
.ruff_cache/
|
||||||
.env
|
.env
|
||||||
sqlite-db/
|
sqlite-db/
|
||||||
|
temp/
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -9,6 +9,7 @@ docker.env
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.so
|
*.so
|
||||||
todo.md
|
todo.md
|
||||||
|
temp/
|
||||||
|
|
||||||
# Distribution / packaging
|
# Distribution / packaging
|
||||||
.Python
|
.Python
|
||||||
|
|
|
||||||
33
Makefile
33
Makefile
|
|
@ -1,8 +1,12 @@
|
||||||
.PHONY: run check ruff database lint docker-build docker-push
|
.PHONY: run check ruff database lint docker-build docker-push docker-buildx-prepare docker-release
|
||||||
|
|
||||||
# Get version from pyproject.toml
|
# Get version from pyproject.toml
|
||||||
VERSION := $(shell grep -m1 version pyproject.toml | cut -d'"' -f2)
|
VERSION := $(shell grep -m1 version pyproject.toml | cut -d'"' -f2)
|
||||||
IMAGE_NAME := lfnovo/open_notebook
|
IMAGE_NAME := lfnovo/open_notebook
|
||||||
|
|
||||||
|
# Plataformas mais comumente suportadas pela imagem Python
|
||||||
|
PLATFORMS=linux/amd64,linux/arm64,linux/arm/v7,linux/386
|
||||||
|
|
||||||
database:
|
database:
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
|
||||||
|
|
@ -15,13 +19,26 @@ lint:
|
||||||
ruff:
|
ruff:
|
||||||
ruff check . --fix
|
ruff check . --fix
|
||||||
|
|
||||||
docker-build:
|
# Configuração do buildx para multi-plataforma
|
||||||
docker build . -t $(IMAGE_NAME):$(VERSION)
|
docker-buildx-prepare:
|
||||||
docker tag $(IMAGE_NAME):$(VERSION) $(IMAGE_NAME):latest
|
docker buildx create --use --name multi-platform-builder || true
|
||||||
|
|
||||||
|
# Build multi-plataforma com buildx
|
||||||
|
docker-build: docker-buildx-prepare
|
||||||
|
docker buildx build \
|
||||||
|
--platform $(PLATFORMS) \
|
||||||
|
-t $(IMAGE_NAME):$(VERSION) \
|
||||||
|
-t $(IMAGE_NAME):latest \
|
||||||
|
--push \
|
||||||
|
.
|
||||||
|
|
||||||
|
# O push já é feito durante o build com buildx
|
||||||
docker-push:
|
docker-push:
|
||||||
docker push $(IMAGE_NAME):$(VERSION)
|
@echo "Push já foi realizado durante o build com buildx"
|
||||||
docker push $(IMAGE_NAME):latest
|
|
||||||
|
|
||||||
# Combined build and push
|
# Build e push combinados
|
||||||
docker-release: docker-build docker-push
|
docker-release: docker-build
|
||||||
|
|
||||||
|
# Comando útil para verificar as plataformas suportadas após o build
|
||||||
|
docker-check-platforms:
|
||||||
|
docker manifest inspect $(IMAGE_NAME):$(VERSION)
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "open-notebook"
|
name = "open-notebook"
|
||||||
version = "0.0.1"
|
version = "0.0.2"
|
||||||
description = "An open source implementation of a research assistant, inspired by Google Notebook LM"
|
description = "An open source implementation of a research assistant, inspired by Google Notebook LM"
|
||||||
authors = ["Luis Novo <lfnovo@gmail.com>"]
|
authors = ["Luis Novo <lfnovo@gmail.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue