Spaces:
Sleeping
Sleeping
File size: 557 Bytes
d7171f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | FROM python:3.11-slim
# Create a non-root user (Required for Hugging Face Spaces)
RUN useradd -m -u 1000 user
# Set working directory
WORKDIR /app
# Switch to the new user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Copy requirements and install
COPY --chown=user:user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY --chown=user:user . .
# Expose the default port used by Hugging Face Spaces
EXPOSE 7860
# Run both the FastAPI backend and Streamlit frontend
CMD ["bash", "run.sh"] |