Spaces:
Sleeping
Sleeping
GabrielLogspace
commited on
Commit
•
e3e7dcc
1
Parent(s):
d78e100
Update Dockerfile
Browse files- Dockerfile +24 -15
Dockerfile
CHANGED
@@ -1,21 +1,30 @@
|
|
1 |
-
FROM python:
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
RUN mkdir -p /home/langflow && chown user:user /home/langflow
|
7 |
-
USER user
|
8 |
-
ENV HOME=/home/user \
|
9 |
-
PATH=/home/user/.local/bin:$PATH \
|
10 |
-
LANGFLOW_DATABASE_URL=sqlite:////home/langflow/langflow.db \
|
11 |
-
LANGFLOW_AUTO_LOGIN=True
|
12 |
-
|
13 |
|
14 |
-
|
|
|
|
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
|
18 |
-
|
|
|
19 |
|
|
|
20 |
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM nikolaik/python-nodejs:python3.10-nodejs21
|
2 |
|
3 |
+
USER root
|
4 |
+
# Update and install required packages
|
5 |
+
RUN apt-get update && apt-get install gcc g++ git make pipx -y
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
+
ENV LANGFLOW_HOME=/home/pn/langflow \
|
8 |
+
PATH=/root/.local/bin:$PATH
|
9 |
+
ENV LANGFLOW_DATABASE_URL=sqlite:////home/pn/langflow.db
|
10 |
|
11 |
+
# Clone the langflow repository and switch to the dev branch
|
12 |
+
ADD https://api.github.com/repos/logspace-ai/langflow/git/refs/heads/db version.json
|
13 |
+
RUN git clone https://github.com/logspace-ai/langflow.git $LANGFLOW_HOME \
|
14 |
+
&& cd $LANGFLOW_HOME \
|
15 |
+
&& git checkout zustand/io/migration && git pull
|
16 |
|
17 |
+
# Copy the code into the container
|
18 |
+
RUN chown -R pn:pn $LANGFLOW_HOME
|
19 |
|
20 |
+
USER pn
|
21 |
|
22 |
+
WORKDIR $LANGFLOW_HOME
|
23 |
+
|
24 |
+
# Create logs directory
|
25 |
+
RUN mkdir logs && chmod 777 logs
|
26 |
+
RUN pipx install poetry
|
27 |
+
|
28 |
+
RUN make install_frontend && make build_frontend && make install_backend
|
29 |
+
|
30 |
+
CMD ["make", "start", "host=0.0.0.0", "port=7860", "log_level=debug", "path=/home/pn/langflow/src/backend/base/langflow/frontend"]
|