sop-flow-studio / Dockerfile
Trae Assistant
优化
3de8de2
raw
history blame contribute delete
533 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create a non-root user for security (required by HF Spaces)
RUN useradd -m -u 1000 user
RUN chown -R user:user /app
# Ensure data directory exists and has correct permissions
RUN mkdir -p /app/data && chown -R user:user /app/data && chmod -R 777 /app/data
USER user
EXPOSE 7860
# Use gunicorn for production
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]