Spaces:
Sleeping
Sleeping
FROM nikolaik/python-nodejs | |
# Update and install required packages | |
RUN apt-get update && apt-get install gcc g++ git make -y | |
# Switch to the existing node user | |
USER node | |
ENV HOME=/home/node \ | |
LANGFLOW_HOME=/home/node/langflow \ | |
PATH=/home/node/.local/bin:$PATH | |
# Clone the langflow repository and switch to the dev branch | |
ADD https://api.github.com/repos/logspace-ai/langflow/git/refs/heads/dev version.json | |
USER root | |
RUN git clone https://github.com/logspace-ai/langflow.git $LANGFLOW_HOME \ | |
&& chown -R node:node $LANGFLOW_HOME | |
USER node | |
WORKDIR $LANGFLOW_HOME | |
RUN git checkout dev | |
# Copy the code into the container | |
COPY . . | |
# Update the config.yaml file, build and install the langflow package | |
RUN sed -i 's/dev: false/dev: true/' src/backend/langflow/config.yaml \ | |
&& make -C $LANGFLOW_HOME/src/backend/langflow/ build \ | |
&& pip install $LANGFLOW_HOME/src/backend/langflow/dist/*.tar.gz | |
CMD ["langflow", "--host", "0.0.0.0", "--port", "7860"] | |