# Use an official Python runtime as a base image FROM python:3.9-slim # Set the working directory in the container WORKDIR /app # Copy the current directory contents into the container COPY . /app # Install any needed packages specified in requirements.txt # COPY requirements.txt /app/ # RUN pip install --no-cache-dir -r requirements.txt RUN pip install uvicorn RUN pip install fastapi RUN pip install python-dotenv RUN pip install openai RUN pip install chainlit RUN chmod -R 777 /app # Make port 8000 available to the world outside this container EXPOSE 8080 # Define environment variable ENV UVICORN_HOST=0.0.0.0 ENV UVICORN_PORT=8080 # Run the application CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]