File size: 672 Bytes
4a50b09
 
b60cabd
 
 
d9783e2
b60cabd
 
 
 
 
 
 
 
 
f8a98e2
b60cabd
 
f8a98e2
b60cabd
 
 
f8a98e2
fcf032e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use Python 3.11 (to match your local environment)
FROM python:3.11-slim

WORKDIR /app

# Install build tools
RUN apt-get update && apt-get install -y \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

# Create writable directories for the database and uploads
RUN mkdir -p /app/chroma_db && chmod -R 777 /app/chroma_db
RUN mkdir -p /app/Uploads && chmod -R 777 /app/Uploads
# RUN mkdir -p /app/flask_session ... <--- REMOVED

EXPOSE 7860

# We add "--workers 1" to force a single worker.
CMD ["gunicorn", "--workers", "1", "-b", "0.0.0.0:7860", "app:app", "--timeout", "300"]