# Use the official Python slim image to keep the image size small | |
FROM python:3.11-slim | |
# Set working directory | |
WORKDIR /app | |
# Copy all application and test files | |
COPY . . | |
# Install dependencies | |
RUN pip install --no-cache-dir -r requirements.txt && \ | |
pip install --no-cache-dir requests pytest | |
# Expose the port for the FastAPI server | |
EXPOSE 7860 | |
# Command to run the application | |
CMD ["uvicorn", "bot_runner:app", "--host", "0.0.0.0", "--port", "7860", "--reload"] |