Spaces:
Sleeping
Sleeping
GabrielLogspace
commited on
Commit
•
33e0211
1
Parent(s):
f26b229
Update Dockerfile
Browse files- Dockerfile +15 -22
Dockerfile
CHANGED
@@ -1,30 +1,23 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
RUN apt-get update && apt-get install gcc g++ git make pipx -y
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
ENV LANGFLOW_DATABASE_URL=sqlite:////home/pn/langflow.db
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
16 |
|
17 |
-
|
18 |
-
RUN chown -R pn:pn $LANGFLOW_HOME
|
19 |
|
20 |
-
|
21 |
|
22 |
-
|
23 |
|
24 |
-
# Create logs directory
|
25 |
-
RUN mkdir logs && chmod 777 logs
|
26 |
-
RUN pipx install poetry
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
CMD ["make", "start", "host=0.0.0.0", "port=7860", "log_level=debug", "path=/home/pn/langflow/src/backend/base/langflow/frontend"]
|
|
|
1 |
+
FROM python:3.10-slim
|
2 |
|
3 |
+
RUN apt-get update && apt-get install gcc g++ git make -y
|
4 |
+
RUN useradd -m -u 1000 user
|
|
|
5 |
|
6 |
+
# Create the directory and set the permissions
|
7 |
+
RUN mkdir -p /home/langflow && chown user:user /home/langflow
|
|
|
8 |
|
9 |
+
USER user
|
10 |
+
ENV HOME=/home/user \
|
11 |
+
PATH=/home/user/.local/bin:$PATH \
|
12 |
+
LANGFLOW_DATABASE_URL=sqlite:////home/langflow/langflow.db \
|
13 |
+
LANGFLOW_AUTO_LOGIN=True
|
14 |
+
|
15 |
|
16 |
+
WORKDIR $HOME/app
|
|
|
17 |
|
18 |
+
COPY --chown=user . $HOME/app
|
19 |
|
20 |
+
RUN pip install langflow --pre -U --user
|
21 |
|
|
|
|
|
|
|
22 |
|
23 |
+
CMD python -m langflow run --host 0.0.0.0 --port 7860 --log-level debug
|
|
|
|