Langflow / Dockerfile
GabrielLogspace's picture
Update Dockerfile
a294d32 verified
raw
history blame
954 Bytes
FROM nikolaik/python-nodejs:python3.10-nodejs21
# Update and install required packages
RUN apt-get update && apt-get install gcc g++ git make -y
ENV LANGFLOW_HOME=/home/langflow \
PATH=/root/.local/bin:$PATH
ENV LANGFLOW_DATABASE_URL=sqlite:////home/langflow/langflow.db
# Clone the langflow repository and switch to the dev branch
ADD https://api.github.com/repos/logspace-ai/langflow/git/refs/heads/db version.json
RUN git clone https://github.com/logspace-ai/langflow.git $LANGFLOW_HOME \
&& cd $LANGFLOW_HOME \
&& git checkout dev && git pull
# Copy the code into the container
WORKDIR $LANGFLOW_HOME
COPY . .
# Create logs directory and set permissions
RUN mkdir logs && chmod 777 logs
# Set permissions for database folder
RUN chmod 777 /home/langflow
# Update the config.yaml file, build and install the langflow package
RUN make build && pip install dist/*.tar.gz
CMD ["langflow","run", "--host", "0.0.0.0", "--port", "7860"]