mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-23 16:10:27 +08:00
ci: Update Docker commands to use Podman and add missing bindings for LFX (#9838)
This commit is contained in:
committed by
GitHub
parent
726beaebc3
commit
8e18fd973f
22
Makefile
22
Makefile
@ -2,6 +2,7 @@
|
||||
|
||||
# Configurations
|
||||
VERSION=$(shell grep "^version" pyproject.toml | sed 's/.*\"\(.*\)\"$$/\1/')
|
||||
DOCKER=podman
|
||||
DOCKERFILE=docker/build_and_push.Dockerfile
|
||||
DOCKERFILE_BACKEND=docker/build_and_push_backend.Dockerfile
|
||||
DOCKERFILE_FRONTEND=docker/frontend/build_and_push_frontend.Dockerfile
|
||||
@ -331,42 +332,45 @@ docker_build_frontend: dockerfile_build_fe clear_dockerimage ## build Frontend D
|
||||
|
||||
dockerfile_build:
|
||||
@echo 'BUILDING DOCKER IMAGE: ${DOCKERFILE}'
|
||||
@docker build --rm \
|
||||
@command -v $(DOCKER) >/dev/null 2>&1 || { echo "Error: $(DOCKER) is not installed. Please install $(DOCKER), or run 'make docker_build DOCKER=podman' (or DOCKER=docker) if you have an alternative installed."; exit 1; }
|
||||
@$(DOCKER) build --rm \
|
||||
-f ${DOCKERFILE} \
|
||||
-t langflow:${VERSION} .
|
||||
|
||||
dockerfile_build_be: dockerfile_build
|
||||
@echo 'BUILDING DOCKER IMAGE BACKEND: ${DOCKERFILE_BACKEND}'
|
||||
@docker build --rm \
|
||||
@command -v $(DOCKER) >/dev/null 2>&1 || { echo "Error: $(DOCKER) is not installed. Please install $(DOCKER), or run 'make docker_build_backend DOCKER=podman' (or DOCKER=docker) if you have an alternative installed."; exit 1; }
|
||||
@$(DOCKER) build --rm \
|
||||
--build-arg LANGFLOW_IMAGE=langflow:${VERSION} \
|
||||
-f ${DOCKERFILE_BACKEND} \
|
||||
-t langflow_backend:${VERSION} .
|
||||
|
||||
dockerfile_build_fe: dockerfile_build
|
||||
@echo 'BUILDING DOCKER IMAGE FRONTEND: ${DOCKERFILE_FRONTEND}'
|
||||
@docker build --rm \
|
||||
@command -v $(DOCKER) >/dev/null 2>&1 || { echo "Error: $(DOCKER) is not installed. Please install $(DOCKER), or run 'make docker_build_frontend DOCKER=podman' (or DOCKER=docker) if you have an alternative installed."; exit 1; }
|
||||
@$(DOCKER) build --rm \
|
||||
--build-arg LANGFLOW_IMAGE=langflow:${VERSION} \
|
||||
-f ${DOCKERFILE_FRONTEND} \
|
||||
-t langflow_frontend:${VERSION} .
|
||||
|
||||
clear_dockerimage:
|
||||
@echo 'Clearing the docker build'
|
||||
@if docker images -f "dangling=true" -q | grep -q '.*'; then \
|
||||
docker rmi $$(docker images -f "dangling=true" -q); \
|
||||
@if $(DOCKER) images -f "dangling=true" -q | grep -q '.*'; then \
|
||||
$(DOCKER) rmi $$($(DOCKER) images -f "dangling=true" -q); \
|
||||
fi
|
||||
|
||||
docker_compose_up: docker_build docker_compose_down
|
||||
@echo 'Running docker compose up'
|
||||
docker compose -f $(DOCKER_COMPOSE) up --remove-orphans
|
||||
$(DOCKER) compose -f $(DOCKER_COMPOSE) up --remove-orphans
|
||||
|
||||
docker_compose_down:
|
||||
@echo 'Running docker compose down'
|
||||
docker compose -f $(DOCKER_COMPOSE) down || true
|
||||
$(DOCKER) compose -f $(DOCKER_COMPOSE) down || true
|
||||
|
||||
dcdev_up:
|
||||
@echo 'Running docker compose up'
|
||||
docker compose -f docker/dev.docker-compose.yml down || true
|
||||
docker compose -f docker/dev.docker-compose.yml up --remove-orphans
|
||||
$(DOCKER) compose -f docker/dev.docker-compose.yml down || true
|
||||
$(DOCKER) compose -f docker/dev.docker-compose.yml up --remove-orphans
|
||||
|
||||
lock_base:
|
||||
cd src/backend/base && uv lock
|
||||
|
||||
@ -40,6 +40,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=src/backend/base/README.md,target=src/backend/base/README.md \
|
||||
--mount=type=bind,source=src/backend/base/uv.lock,target=src/backend/base/uv.lock \
|
||||
--mount=type=bind,source=src/backend/base/pyproject.toml,target=src/backend/base/pyproject.toml \
|
||||
--mount=type=bind,source=src/lfx/README.md,target=src/lfx/README.md \
|
||||
--mount=type=bind,source=src/lfx/pyproject.toml,target=src/lfx/pyproject.toml \
|
||||
uv sync --frozen --no-install-project --no-editable --extra postgresql
|
||||
|
||||
COPY ./src /app/src
|
||||
|
||||
@ -40,6 +40,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=src/backend/base/README.md,target=src/backend/base/README.md \
|
||||
--mount=type=bind,source=src/backend/base/uv.lock,target=src/backend/base/uv.lock \
|
||||
--mount=type=bind,source=src/backend/base/pyproject.toml,target=src/backend/base/pyproject.toml \
|
||||
--mount=type=bind,source=src/lfx/README.md,target=src/lfx/README.md \
|
||||
--mount=type=bind,source=src/lfx/pyproject.toml,target=src/lfx/pyproject.toml \
|
||||
uv sync --frozen --no-install-project --no-editable --extra nv-ingest --extra postgresql
|
||||
|
||||
COPY ./src /app/src
|
||||
|
||||
@ -40,6 +40,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=src/backend/base/README.md,target=src/backend/base/README.md \
|
||||
--mount=type=bind,source=src/backend/base/uv.lock,target=src/backend/base/uv.lock \
|
||||
--mount=type=bind,source=src/backend/base/pyproject.toml,target=src/backend/base/pyproject.toml \
|
||||
--mount=type=bind,source=src/lfx/README.md,target=src/lfx/README.md \
|
||||
--mount=type=bind,source=src/lfx/pyproject.toml,target=src/lfx/pyproject.toml \
|
||||
uv sync --frozen --no-install-project --no-editable --extra couchbase --extra cassio --extra local --extra clickhouse-connect --extra nv-ingest --extra postgresql
|
||||
|
||||
COPY ./src /app/src
|
||||
|
||||
Reference in New Issue
Block a user