Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -1
Dockerfile
CHANGED
|
@@ -1,6 +1,10 @@
|
|
| 1 |
# Use the latest version of langflow
|
| 2 |
FROM langflowai/langflow:latest
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# Create accessible folders and set the working directory in the container
|
| 5 |
RUN mkdir /app/flows
|
| 6 |
RUN mkdir /app/langflow-config-dir
|
|
@@ -8,7 +12,9 @@ WORKDIR /app
|
|
| 8 |
|
| 9 |
# Copy the flows, optional components, and langflow-config-dir folders to the container
|
| 10 |
COPY flows /app/flows
|
|
|
|
| 11 |
COPY langflow-config-dir /app/langflow-config-dir
|
|
|
|
| 12 |
|
| 13 |
# copy docker.env file
|
| 14 |
COPY docker.env /app/.env
|
|
@@ -17,8 +23,14 @@ COPY docker.env /app/.env
|
|
| 17 |
ENV PYTHONPATH=/app
|
| 18 |
ENV LANGFLOW_LOAD_FLOWS_PATH=/app/flows
|
| 19 |
ENV LANGFLOW_CONFIG_DIR=/app/langflow-config-dir
|
|
|
|
| 20 |
ENV LANGFLOW_LOG_ENV=container
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
# Command to run the server
|
| 23 |
EXPOSE 7860
|
| 24 |
-
CMD
|
|
|
|
|
|
| 1 |
# Use the latest version of langflow
|
| 2 |
FROM langflowai/langflow:latest
|
| 3 |
|
| 4 |
+
RUN useradd -m -u 1000 user
|
| 5 |
+
USER user
|
| 6 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
| 7 |
+
|
| 8 |
# Create accessible folders and set the working directory in the container
|
| 9 |
RUN mkdir /app/flows
|
| 10 |
RUN mkdir /app/langflow-config-dir
|
|
|
|
| 12 |
|
| 13 |
# Copy the flows, optional components, and langflow-config-dir folders to the container
|
| 14 |
COPY flows /app/flows
|
| 15 |
+
COPY components /app/components
|
| 16 |
COPY langflow-config-dir /app/langflow-config-dir
|
| 17 |
+
COPY --chown=user app.py /app/app.py
|
| 18 |
|
| 19 |
# copy docker.env file
|
| 20 |
COPY docker.env /app/.env
|
|
|
|
| 23 |
ENV PYTHONPATH=/app
|
| 24 |
ENV LANGFLOW_LOAD_FLOWS_PATH=/app/flows
|
| 25 |
ENV LANGFLOW_CONFIG_DIR=/app/langflow-config-dir
|
| 26 |
+
ENV LANGFLOW_COMPONENTS_PATH=/app/components
|
| 27 |
ENV LANGFLOW_LOG_ENV=container
|
| 28 |
+
RUN pip install --no-cache-dir uv
|
| 29 |
+
RUN uv pip install --no-cache-dir chainlit
|
| 30 |
+
RUN uv pip install --no-cache-dir numpy
|
| 31 |
+
RUN uv pip install --no-cache-dir audioop-lts
|
| 32 |
|
| 33 |
# Command to run the server
|
| 34 |
EXPOSE 7860
|
| 35 |
+
CMD python3 -m chainlit run app.py --host 0.0.0.0 --port 7860
|
| 36 |
+
#CMD ["langflow", "run", "--backend-only", "--env-file","/app/.env","--host", "0.0.0.0", "--port", "7860"]
|