javear commited on
Commit
cf3fdc9
·
verified ·
1 Parent(s): 50fd3a1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -16
Dockerfile CHANGED
@@ -1,36 +1,22 @@
1
- # Use an official Python runtime as a parent image
2
  FROM python:3.10-slim
3
 
4
- # Set environment variables
5
  ENV PYTHONDONTWRITEBYTECODE=1 \
6
  PYTHONUNBUFFERED=1 \
7
  LANG=C.UTF-8 \
8
  LC_ALL=C.UTF-8
9
 
10
- # Set work directory
11
  WORKDIR /app
12
 
13
- # Install system dependencies
14
- RUN apt-get update \
15
- && apt-get install -y --no-install-recommends gcc libpq-dev build-essential \
16
- && apt-get clean \
17
- && rm -rf /var/lib/apt/lists/*
18
 
19
- # Install Poetry (if used) or pip
20
  RUN pip install --no-cache-dir poetry
21
 
22
- # Copy project files
23
  COPY . /app
24
 
25
- # Install dependencies (use Poetry or pip based on your setup)
26
- RUN poetry config virtualenvs.create false \
27
- && poetry install --no-interaction --no-ansi
28
 
29
- # Expose application port (Hugging Face Spaces expects port 7860)
30
  EXPOSE 7860
31
 
32
- # Set environment variable for PostgreSQL
33
  ENV DATABASE_URL=postgresql+psycopg2://langflow_user:langflow_password@your-cloud-postgres-url:5432/langflow_db
34
 
35
- # Run LangFlow application
36
  CMD ["poetry", "run", "langflow_lentera", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  ENV PYTHONDONTWRITEBYTECODE=1 \
4
  PYTHONUNBUFFERED=1 \
5
  LANG=C.UTF-8 \
6
  LC_ALL=C.UTF-8
7
 
 
8
  WORKDIR /app
9
 
10
+ RUN apt-get update && apt-get install -y --no-install-recommends gcc libpq-dev build-essential && apt-get clean && rm -rf /var/lib/apt/lists/*
 
 
 
 
11
 
 
12
  RUN pip install --no-cache-dir poetry
13
 
 
14
  COPY . /app
15
 
16
+ RUN poetry install --no-interaction --no-ansi
 
 
17
 
 
18
  EXPOSE 7860
19
 
 
20
  ENV DATABASE_URL=postgresql+psycopg2://langflow_user:langflow_password@your-cloud-postgres-url:5432/langflow_db
21
 
 
22
  CMD ["poetry", "run", "langflow_lentera", "--host", "0.0.0.0", "--port", "7860"]