langflowTest3 / Dockerfile
xaochNYU's picture
Update Dockerfile
e616fec verified
# Use the latest version of langflow
FROM langflowai/langflow:latest
# Create accessible folders and set the working directory in the container
RUN mkdir /app/flows
RUN mkdir /app/langflow-config-dir
WORKDIR /app
# Copy the flows, optional components, and langflow-config-dir folders to the container
COPY flows /app/flows
COPY langflow-config-dir /app/langflow-config-dir
COPY app.py /app/app.py
COPY --chmod=777 start.sh /app/start.sh
# copy docker.env file
COPY docker.env /app/.env
# Set environment variables
ENV PYTHONPATH=/app
ENV LANGFLOW_LOAD_FLOWS_PATH=/app/flows
ENV LANGFLOW_CONFIG_DIR=/app/langflow-config-dir
ENV LANGFLOW_LOG_ENV=container
RUN pip install --no-cache-dir uv
RUN uv pip install --no-cache-dir chainlit
RUN uv pip install --no-cache-dir numpy
# Command to run the server
EXPOSE 7860
CMD ./start.sh
#CMD python3 -m chainlit run app.py --host 0.0.0.0 --port 7860
#CMD ["langflow", "run", "--backend-only", "--env-file","/app/.env","--host", "0.0.0.0", "--port", "7860"]