# Use official Python image | |
FROM python:3.10-slim | |
# Set working directory | |
WORKDIR /app | |
# Copy all files to the containedocker rmi recommendation-system | |
COPY . . | |
# Install dependencies | |
RUN pip install --no-cache-dir -r requirements.txt -c constraints.txt | |
# Optional: install as a local package (important!) | |
RUN pip install -e . | |
# Expose Streamlit default port | |
EXPOSE 7860 | |
# Run your app in both FastAPI and Streamlit | |
#CMD ["python", "run_both.py", "run"] | |
# Set Streamlit config (turn off telemetry and headless mode) | |
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false | |
# Start Streamlit app | |
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] | |