Spaces:
Build error
Build error
Update Dockerfile
Browse files123456789101112131415161718192021222324252627282930313233343536# Use an official Python runtime as a parent imageFROM python:3.10-slim# Set environment variablesENV PYTHONDONTWRITEBYTECODE=1 \PYTHONUNBUFFERED=1 \LANG=C.UTF-8 \LC_ALL=C.UTF-8# Set work directoryWORKDIR /app# Install system dependenciesRUN apt-get update \&& apt-get install -y --no-install-recommends gcc libpq-dev build-essential \&& apt-get clean \&& rm -rf /var/lib/apt/lists/*# Install Poetry (if used) or pipRUN pip install --no-cache-dir poetry# Copy project filesCOPY . /app# Install dependencies (use Poetry or pip based on your setup)RUN poetry config virtualenvs.create false \&& poetry install --no-interaction --no-ansi# Expose application port (Hugging Face Spaces expects port 7860)EXPOSE 7860# Set environment variable for PostgreSQLENV DATABASE_URL=postgresql+psycopg2://langflow_user:langflow_password@your-cloud-postgres-url:5432/langflow_db# Run LangFlow applicationCMD ["poetry", "run", "langflow_lentera", "--host", "0.0.0.0", "--port", "7860"]12345678910111213141516171819202122FROM python:3.10-slimENV PYTHONDONTWRITEBYTECODE=1 \PYTHONUNBUFFERED=1 \LANG=C.UTF-8 \LC_ALL=C.UTF-8WORKDIR /appRUN apt-get update && apt-get install -y --no-install-recommends gcc libpq-dev build-essential && apt-get clean && rm -rf /var/lib/apt/lists/*RUN pip install --no-cache-dir poetryCOPY . /appRUN poetry install --no-interaction --no-ansiEXPOSE 7860ENV DATABASE_URL=postgresql+psycopg2://langflow_user:langflow_password@your-cloud-postgres-url:5432/langflow_dbCMD ["poetry", "run", "langflow_lentera", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile+2-16