Trae Assistant
Enhance: Local assets, default data, gunicorn support
253cabf
raw
history blame contribute delete
402 Bytes
FROM python:3.9-slim
WORKDIR /app
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create a non-root user
RUN useradd -m -u 1000 user && \
chown -R user:user /app && \
chmod -R 777 /app
USER user
# Expose port
EXPOSE 7860
# Run the application
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]