Update Dockerfiles, main.py, constants.py, and package versions (#1691)
* Update Dockerfiles to include user creation and use --user flag for pip install * Add JavaScriptMIMETypeMiddleware to main.py * Update constants.py and run.py files * Update package versions in poetry.lock and pyproject.toml files * Refactor Dockerfile to optimize image building process * Fix import error in main.py * Update Dockerfiles to use logspace/langflow image
This commit is contained in:
parent
30203a0bb3
commit
1a021321a9
13 changed files with 31 additions and 123 deletions
|
|
@ -63,8 +63,10 @@ RUN --mount=type=cache,target=/root/.cache \
|
|||
|
||||
# copy project requirement files here to ensure they will be cached.
|
||||
WORKDIR $PYSETUP_PATH
|
||||
# Copy just one file to avoid rebuilding the whole image
|
||||
COPY poetry.lock pyproject.toml ./
|
||||
COPY ./src/backend/langflow/main.py ./src/backend/langflow/main.py
|
||||
COPY ./src/backend/langflow ./src/backend/langflow
|
||||
COPY ./src/backend/base/pyproject.toml ./src/backend/base/pyproject.toml
|
||||
# Copy README.md to the build context
|
||||
COPY README.md .
|
||||
# install runtime deps - uses $POETRY_VIRTUALENVS_IN_PROJECT internally
|
||||
|
|
@ -84,7 +86,7 @@ COPY --from=builder-base $POETRY_HOME $POETRY_HOME
|
|||
COPY --from=builder-base $PYSETUP_PATH $PYSETUP_PATH
|
||||
|
||||
# Copy just one file to avoid rebuilding the whole image
|
||||
COPY ./src/backend/langflow/__init__.py ./src/backend/langflow/__init__.py
|
||||
COPY ./src/backend/langflow ./src/backend/langflow
|
||||
# quicker install as runtime deps are already installed
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
poetry install --with=dev --extras deploy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue