otavioLogspace commited on
Commit
39f15c9
1 Parent(s): 5db1ab6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -13
Dockerfile CHANGED
@@ -3,27 +3,26 @@ FROM nikolaik/python-nodejs
3
  # Update and install required packages
4
  RUN apt-get update && apt-get install gcc g++ git make -y
5
 
6
- ENV HOME=/home/node \
7
- PATH=/home/node/.local/bin:$PATH
8
 
9
- # Switch to the root user
10
- USER root
 
11
 
12
  # Clone the langflow repository and switch to the dev branch
13
- RUN git clone https://github.com/logspace-ai/langflow.git $HOME/langflow \
14
- && cd $HOME/langflow \
 
15
  && git checkout dev
16
 
17
- # Switch back to the node user
18
- USER node
19
-
20
  # Copy the code into the container
21
- WORKDIR $HOME/langflow
22
  COPY . .
23
 
24
  # Update the config.yaml file, build and install the langflow package
25
  RUN sed -i 's/dev: false/dev: true/' src/backend/langflow/config.yaml \
26
- && make build \
27
- && pip install dist/*.tar.gz
28
 
29
- CMD ["langflow", "--host", "0.0.0.0", "--port", "7860"]
 
3
  # Update and install required packages
4
  RUN apt-get update && apt-get install gcc g++ git make -y
5
 
6
+ # Switch to the existing node user
7
+ USER node
8
 
9
+ ENV HOME=/home/node \
10
+ LANGFLOW_HOME=/home/node/langflow \
11
+ PATH=/home/node/.local/bin:$PATH
12
 
13
  # Clone the langflow repository and switch to the dev branch
14
+ ADD https://api.github.com/repos/logspace-ai/langflow/git/refs/heads/dev version.json
15
+ RUN git clone https://github.com/logspace-ai/langflow.git $LANGFLOW_HOME \
16
+ && cd $LANGFLOW_HOME \
17
  && git checkout dev
18
 
 
 
 
19
  # Copy the code into the container
20
+ WORKDIR $LANGFLOW_HOME
21
  COPY . .
22
 
23
  # Update the config.yaml file, build and install the langflow package
24
  RUN sed -i 's/dev: false/dev: true/' src/backend/langflow/config.yaml \
25
+ && make -C $LANGFLOW_HOME/src/backend/langflow/ build \
26
+ && pip install $LANGFLOW_HOME/src/backend/langflow/dist/*.tar.gz
27
 
28
+ CMD ["langflow", "--host", "0.0.0.0", "--port", "7860"]