File size: 1,203 Bytes
391c4ee
8a75462
391c4ee
 
 
8a75462
391c4ee
 
 
8a75462
391c4ee
 
 
 
 
8a75462
391c4ee
 
9e7c6b0
391c4ee
9e7c6b0
391c4ee
9e7c6b0
391c4ee
 
9fc0c61
 
391c4ee
 
9fc0c61
 
 
 
 
 
 
391c4ee
 
 
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
32
33
34
35
36
37
38
39
FROM nikolaik/python-nodejs:python3.10-nodejs21

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

ENV LANGFLOW_HOME=/home/pn/langflow \
    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 dev && git pull

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

USER pn

WORKDIR $LANGFLOW_HOME

# Create logs directory
RUN mkdir logs && chmod 777 logs

# Install poetry using pipx
RUN pipx install poetry

# Copy the requirements.txt file into the container
COPY requirements.txt $LANGFLOW_HOME/

# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Build the frontend and backend
RUN make install_frontend && make build_frontend && make install_backend

CMD ["make", "start", "host=0.0.0.0", "port=7860", "log_level=debug", "path=/home/pn/langflow/src/backend/base/langflow/frontend"]