Trae Assistant
Enhance: Add file upload, localization and fixes
476df4f
raw
history blame contribute delete
548 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies if needed (e.g. for numpy/pandas compilation sometimes)
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Create a non-root user for security (Hugging Face Spaces requirement often)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]