Spaces:
Sleeping
Sleeping
GabrielLogspace
commited on
Commit
•
ec2da8f
1
Parent(s):
b37b58e
Update Dockerfile
Browse files- Dockerfile +10 -12
Dockerfile
CHANGED
@@ -1,32 +1,30 @@
|
|
1 |
FROM nikolaik/python-nodejs:python3.10-nodejs21
|
2 |
|
3 |
# Update and install required packages
|
4 |
-
RUN apt-get update && apt-get install
|
5 |
|
6 |
ENV LANGFLOW_HOME=/home/langflow \
|
7 |
PATH=/root/.local/bin:$PATH
|
8 |
ENV LANGFLOW_DATABASE_URL=sqlite:////home/langflow/langflow.db
|
9 |
|
10 |
-
# Clone the langflow repository and switch to the
|
11 |
ADD https://api.github.com/repos/logspace-ai/langflow/git/refs/heads/db version.json
|
12 |
RUN git clone https://github.com/logspace-ai/langflow.git $LANGFLOW_HOME \
|
13 |
&& cd $LANGFLOW_HOME \
|
14 |
&& git checkout zustand/io/migration && git pull
|
15 |
|
16 |
-
#
|
17 |
-
|
18 |
|
19 |
-
|
|
|
20 |
|
21 |
-
#
|
22 |
-
|
23 |
-
COPY --chown=langflow:langflow . .
|
24 |
|
25 |
-
|
26 |
-
RUN mkdir logs
|
27 |
|
28 |
# Update the config.yaml file, build and install the langflow package
|
29 |
-
# Make sure the non-root user has permissions to execute these operations
|
30 |
RUN make setup_poetry && make install_frontend && make build_frontend && make install_backend
|
31 |
|
32 |
-
CMD ["make", "start", "host=0.0.0.0", "port=7860", "log_level=debug", "open_browser=false"]
|
|
|
1 |
FROM nikolaik/python-nodejs:python3.10-nodejs21
|
2 |
|
3 |
# Update and install required packages
|
4 |
+
RUN apt-get update && apt-get install gcc g++ git make pipx -y
|
5 |
|
6 |
ENV LANGFLOW_HOME=/home/langflow \
|
7 |
PATH=/root/.local/bin:$PATH
|
8 |
ENV LANGFLOW_DATABASE_URL=sqlite:////home/langflow/langflow.db
|
9 |
|
10 |
+
# Clone the langflow repository and switch to the dev branch
|
11 |
ADD https://api.github.com/repos/logspace-ai/langflow/git/refs/heads/db version.json
|
12 |
RUN git clone https://github.com/logspace-ai/langflow.git $LANGFLOW_HOME \
|
13 |
&& cd $LANGFLOW_HOME \
|
14 |
&& git checkout zustand/io/migration && git pull
|
15 |
|
16 |
+
# Copy the code into the container
|
17 |
+
WORKDIR $LANGFLOW_HOME
|
18 |
|
19 |
+
# Create logs directory and set permissions
|
20 |
+
RUN mkdir logs && chmod 777 logs
|
21 |
|
22 |
+
# Set permissions for database folder
|
23 |
+
RUN chmod 777 /home/langflow
|
|
|
24 |
|
25 |
+
RUN chown -R user:user /home/langflow
|
|
|
26 |
|
27 |
# Update the config.yaml file, build and install the langflow package
|
|
|
28 |
RUN make setup_poetry && make install_frontend && make build_frontend && make install_backend
|
29 |
|
30 |
+
CMD ["make", "start", "host=0.0.0.0", "port=7860", "log_level=debug", "open_browser=false"]
|