Spaces:
Sleeping
Sleeping
otavioLogspace
commited on
Commit
•
39f15c9
1
Parent(s):
5db1ab6
Update Dockerfile
Browse files- 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 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
|
|
|
11 |
|
12 |
# Clone the langflow repository and switch to the dev branch
|
13 |
-
|
14 |
-
|
|
|
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 $
|
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"]
|