recsys-logic-studio / Dockerfile
Trae Assistant
Deploy to Hugging Face Spaces: Enhanced UI, Fixed Bugs, Localization
dea3690
raw
history blame contribute delete
582 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# 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
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Expose port 7860 for Hugging Face Spaces
EXPOSE 7860
# Command to run the application
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]