diff --git a/langflow/backend/Dockerfile b/langflow/backend/Dockerfile index 13f2dc62e..c52200bbf 100644 --- a/langflow/backend/Dockerfile +++ b/langflow/backend/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /app RUN apt-get update && apt-get install git -y COPY --from=backend_build /app/dist/*.whl /app/ -RUN pip install langflow-*.whl +RUN pip install langflow_backend-*.whl RUN rm *.whl EXPOSE 80 diff --git a/langflow/backend/build.Dockerfile b/langflow/backend/build.Dockerfile index ff71184f1..b7bb8d91a 100644 --- a/langflow/backend/build.Dockerfile +++ b/langflow/backend/build.Dockerfile @@ -43,12 +43,10 @@ RUN curl -sSL https://install.python-poetry.org | python3 - # copy project requirement files here to ensure they will be cached. WORKDIR /app COPY poetry.lock pyproject.toml ./ +COPY langflow_backend/ ./langflow_backend -# install runtime deps - uses $POETRY_VIRTUALENVS_IN_PROJECT internally +# poetry install RUN poetry install --without dev -RUN poetry add "git+https://github.com/ibiscp/langchain.git#ibis" - -COPY *.py langflow/backend/ -RUN rm langflow/backend/dev.py +# build wheel RUN poetry build -f wheel diff --git a/langflow/backend/build_and_push b/langflow/backend/build_and_push index e3bbdec47..2593d1c96 100755 --- a/langflow/backend/build_and_push +++ b/langflow/backend/build_and_push @@ -1,8 +1,6 @@ #! /bin/bash -poetry remove langchain docker build -t logspace/backend_build -f build.Dockerfile . VERSION=$(toml get --toml-path pyproject.toml tool.poetry.version) docker build --build-arg VERSION=$VERSION -t ibiscp/langflow_backend:$VERSION . docker push ibiscp/langflow_backend:$VERSION -poetry add --editable ../../../langchain