RAG_APP / Dockerfile
sxid003's picture
Update Dockerfile
fdc611d verified
raw
history blame contribute delete
763 Bytes
# Use an official Python image
FROM python:3.11-slim
# Set the working directory
WORKDIR /app
ENV PYTHONPATH=/app
# Copy required files
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN apt-get update && apt-get install -y ffmpeg
# Create an admin user with UID 1000
RUN useradd -m -u 1000 admin
# Copy all application files
COPY . .
# Set ownership of all files and directories to admin
RUN chown -R admin:admin /app
# Switch to the admin user
USER admin
# Expose the ports for the applications
EXPOSE 8000 7860 6274
# Command to run the FastAPI application and other scripts concurrently
CMD ["sh", "-c", "python src/mcp/server.py & python src/main.py & uvicorn src.api.chatbot_api:app --host 0.0.0.0 --port 8000 --reload"]