Spaces:
Sleeping
Sleeping
File size: 763 Bytes
d5ac809 142bda8 d5ac809 5036512 fdc611d d5ac809 5036512 fdc611d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# 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"] |