RagaAI / Dockerfile
ashishbangwal's picture
init
6c7823c
raw
history blame
828 Bytes
# Base Python image
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Create a user to avoid root-level issues with ChromaDB
RUN adduser --disabled-password --gecos "" appuser
USER appuser
# Create working directory
WORKDIR /home/appuser/app
# Copy project files
COPY --chown=appuser:appuser . .
# Install Python dependencies
RUN pip install --upgrade pip \
&& pip install -r requirement.txt
# If using .env file, install python-dotenv and make sure app reads it
RUN pip install python-dotenv
# Expose FastAPI default port
EXPOSE 8000
# Expose Streamlit default port
EXPOSE 8501
# Start FastAPI app in the background, then Streamlit
CMD uvicorn streamlit_app.main_api:app --host 0.0.0.0 --port 8000 & \
streamlit run streamlit_app/app.py --server.port 8501