Spaces:
Sleeping
Sleeping
Gabriel Luiz Freitas Almeida
commited on
Update Dockerfile
Browse files- Dockerfile +13 -8
Dockerfile
CHANGED
|
@@ -1,11 +1,12 @@
|
|
| 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/
|
| 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
|
|
@@ -15,15 +16,19 @@ RUN git clone https://github.com/logspace-ai/langflow.git $LANGFLOW_HOME \
|
|
| 15 |
|
| 16 |
# Copy the code into the container
|
| 17 |
WORKDIR $LANGFLOW_HOME
|
| 18 |
-
COPY . .
|
| 19 |
|
| 20 |
# Create logs directory and set permissions
|
| 21 |
RUN mkdir logs && chmod 777 logs
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
# Update the config.yaml file, build and install the langflow package
|
| 27 |
-
RUN make build && poetry run pip install dist/*.tar.gz
|
| 28 |
|
| 29 |
-
CMD ["
|
|
|
|
| 1 |
FROM nikolaik/python-nodejs:python3.10-nodejs21
|
| 2 |
|
| 3 |
+
USER pn
|
| 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
|
|
|
|
| 16 |
|
| 17 |
# Copy the code into the container
|
| 18 |
WORKDIR $LANGFLOW_HOME
|
|
|
|
| 19 |
|
| 20 |
# Create logs directory and set permissions
|
| 21 |
RUN mkdir logs && chmod 777 logs
|
| 22 |
|
| 23 |
+
|
| 24 |
+
### Update permissions for Langflow
|
| 25 |
+
USER root
|
| 26 |
+
RUN chown -R pn:pn $LANGFLOW_HOME
|
| 27 |
+
RUN chmod 777 /home/pn/langflow/*
|
| 28 |
+
USER pn
|
| 29 |
+
|
| 30 |
+
RUN make setup_poetry && make install_frontend && make build_frontend && make install_backend
|
| 31 |
+
|
| 32 |
# Update the config.yaml file, build and install the langflow package
|
|
|
|
| 33 |
|
| 34 |
+
CMD ["make", "start", "host=0.0.0.0", "port=7860", "log_level=debug", "open_browser=false"]
|