File size: 1,081 Bytes
de1a882
25d40af
4fb5f9f
1763c2a
e4ab603
4c2dd82
8f5d5fe
4c2dd82
92fa9e5
ec2da8f
9f426c7
39f15c9
8f5d5fe
5dc3284
5ec2854
89b3686
92fa9e5
9fd8d4f
92fa9e5
18301fa
89b3686
92fa9e5
9fd8d4f
18301fa
92fa9e5
4c2dd82
18301fa
371e111
92fa9e5
 
34754ba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM nikolaik/python-nodejs:python3.10-nodejs21

# Update and install required packages
RUN apt-get update && apt-get install gcc g++ git make pipx -y

ENV LANGFLOW_HOME=/home/pn \
    PATH=/root/.local/bin:$PATH
ENV LANGFLOW_DATABASE_URL=sqlite:////home/pn/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 zustand/io/migration && git pull

RUN chown -R pn:pn $LANGFLOW_HOME
# Copy the code into the container
WORKDIR $LANGFLOW_HOME
COPY . .

USER pn
# Create logs directory and set permissions
RUN mkdir logs && chmod 777 logs

# Set permissions for database folder
RUN chmod 777 /home/pn

# Update the config.yaml file, build and install the langflow package
RUN make setup_poetry && make install_frontend && make build_frontend && make install_backend

CMD ["make", "run_cli", "host=0.0.0.0", "port=7860", "log_level=debug", "open_browser=false"]