-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/merge-data-standard-operations
- Loading branch information
Showing
645 changed files
with
31,196 additions
and
20,472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,35 @@ | ||
# Source: https://github.com/a5chin/python-uv | ||
FROM debian:bookworm-slim AS builder | ||
|
||
ENV CARGO_HOME="/opt/.cargo" | ||
|
||
SHELL [ "/bin/bash", "-o", "pipefail", "-c" ] | ||
|
||
WORKDIR /opt | ||
|
||
# The installer requires curl (and certificates) to download the release archive | ||
# hadolint ignore=DL3008 | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends ca-certificates curl | ||
|
||
# Run uv installer | ||
RUN curl -LsSf https://astral.sh/uv/install.sh | sh | ||
|
||
|
||
FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm | ||
|
||
|
||
ENV CARGO_HOME="/opt/.cargo" | ||
ENV PATH="$CARGO_HOME/bin/:$PATH" | ||
ENV PYTHONUNBUFFERED=True | ||
ENV UV_LINK_MODE=copy | ||
|
||
WORKDIR /opt | ||
|
||
COPY --from=builder --chown=vscode: $CARGO_HOME $CARGO_HOME | ||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim | ||
|
||
# Set timezone | ||
ENV TZ=UTC | ||
|
||
# Set up work directory | ||
WORKDIR /workspace | ||
|
||
# Install additional dev dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
zsh \ | ||
curl \ | ||
git \ | ||
build-essential \ | ||
npm \ | ||
lsof \ | ||
procps \ | ||
vim \ | ||
less \ | ||
net-tools \ | ||
sudo \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Create the vscode user and group with the expected UID and GID (1000) | ||
RUN groupadd -g 1000 langflow && \ | ||
useradd -m -u 1000 -g 1000 -s /bin/zsh langflow && \ | ||
echo "langflow ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | ||
|
||
# Set default shell to Zsh | ||
SHELL ["/bin/zsh", "-c"] | ||
|
||
RUN echo 'export PS1="%~ %# "' >> /home/langflow/.zshrc | ||
|
||
# Set the default user | ||
USER langflow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Langflow Demo Codespace Readme | ||
|
||
These instructions will walk you through the process of running a Langflow demo via GitHub Codespaces. | ||
|
||
If you want a faster and easier demo experience with Langflow, DataStax Langflow is a hosted environment with zero setup: [Sign up for a free account.](https://astra.datastax.com/signup?type=langflow) | ||
|
||
## Create a Codespace in GitHub | ||
|
||
To setup the demo in Codespace: | ||
|
||
1. Navigate to the Langflow repo | ||
2. On the "Code <>" button, select the "Codespaces" tab | ||
3. Click the green "Create codespace on..." button (or "+" icon if you want more options) to create a new Codespace | ||
|
||
## Wait for everything to install | ||
|
||
After the codespace is opened, there will be two phases to the process. It will take ≈5-10 minutes to complete. | ||
|
||
* **Phase 1**: Building Container; you can click on the "Building Codespace" link to watch the logs | ||
* **Phase 2**: Building Langflow; the terminal will now show `Running postCreateCommand...`, similar to: | ||
|
||
``` | ||
✔ Finishing up... | ||
⠸ Running postCreateCommand... | ||
› sudo chown -R langflow .venv .mypy_cache src/frontend/node_modules src/frontend/build src/backend/base/langflow/frontend && make install_frontend && mak… | ||
``` | ||
|
||
Once completed, this terminal window will close. | ||
|
||
You now need to manually build the frontend. Open a new Terminal and run command: | ||
|
||
```bash | ||
make build_frontend | ||
``` | ||
|
||
This will take a short period of time, you should have a message similar to `Building frontend static files` and the command will complete successfully. | ||
|
||
Installation is now complete. | ||
|
||
## Start up the Service | ||
|
||
Open a new Terminal, and type `uv run langflow run`. | ||
|
||
The service will start, and you will may notice a dialog in the lower right indicating there is a port available to connect to. However, the service will not be ready until you see the welcome banner: | ||
|
||
``` | ||
╭───────────────────────────────────────────────────────────────────╮ | ||
│ Welcome to ⛓ Langflow │ | ||
│ │ | ||
│ │ | ||
│ Collaborate, and contribute at our GitHub Repo 🌟 │ | ||
│ │ | ||
│ We collect anonymous usage data to improve Langflow. │ | ||
│ You can opt-out by setting DO_NOT_TRACK=true in your environment. │ | ||
│ │ | ||
│ Access http://127.0.0.1:7860 │ | ||
╰───────────────────────────────────────────────────────────────────╯ | ||
``` | ||
|
||
At this point you can connect to the service via the port, or if the dialog is gone you can find the "Forwarded Address" on the "Ports" tab (which is next the "Terminal" tab). If there is no port forwarded, you can click the "Forward a Port" button on the "Ports" tab, and forward `7860`. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Codeflash | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "src/backend/base/langflow/**" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
optimize: | ||
name: Optimize new Python code in this PR | ||
if: ${{ github.actor != 'codeflash-ai[bot]' }} | ||
runs-on: ubuntu-latest | ||
env: | ||
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }} | ||
CODEFLASH_PR_NUMBER: ${{ github.event.number }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: astral-sh/setup-uv@v4 | ||
with: | ||
enable-cache: true | ||
python-version: "3.12" | ||
- run: uv sync --extra dev | ||
- name: Run Codeflash Optimizer | ||
working-directory: ./src/backend/base | ||
run: uv run codeflash | ||
- name: Minimize uv cache | ||
run: uv cache prune --ci |
Oops, something went wrong.